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
Multiple zip file downloads from URLI am trying to download and unzip multiple files from a URL to then use in STATA. I have requested …
Esttab Probit Regression columnwiseHello, I ran a multinomial regression model with 11 categories in the dependent variable. When I tr…
stationarity of explanatory variables in time series regressionsI'm finding myself confused and unable to find good answers to what seems to be a simple question: …
Syntax for funnel plotHello, I'm trying create a funnel plot for a meta-analysis of pre-calculated effect estimates (RR) …
Dummy Variables - New to Stata - Gender pay-gap policyHello, I have recently started learning Stata and have been playing around with data sets. The obse…
Subscribe to:
Post Comments (Atom)
0 Response to How to label discrete variables on histogram
Post a Comment