I'm doing a histogram of continuous variable (quallife), discrete by two categories in a binary variable (gender), this is my code (so it looks like two histograms next to each other):
histogram quallife, discrete by(gender)
It produces a nice histogram but I want to relabel the groups so that they don't appear as 1 and 2, but instead as 'male' and 'female'.
I tried this but STATA says 'option relabel not allowed':
histogram quallife, discrete by(gender, relabel(1"Male" 2 "Female"))
I somehow did this correctly at some point but accidentally lost my code and I've been going crazy for days trying to figure out how to do it!
Any help is really appreciated
Thank you
Related Posts with How to label discrete variables on histogram
IV estimates with low mean values of the outcome?Dear all, I am examining the effects of maternal education on low bitrth weights using a fuzzy regr…
Conducting system GMM using xtabond2Dear Stata users, I am using the System GMM approach for estimation and I want to know whether the …
Which statistics should I use when analyzing the effect of interventions on health outcomes?Dear Stata users, I would like to ask which stats I should use. I have health outcomes data (contin…
Testing for serial correlation in panel analysis with instrumentDear all, Is there an alternative way to test for serial-/autocorrelation in a panel data setting w…
coefplot and axis labels of different colorsHi all! I am using coefplot to plot predicted probabilities at certain values for 5 model specifica…
Subscribe to:
Post Comments (Atom)
0 Response to How to label discrete variables on histogram
Post a Comment