Hi Statalist,
I would like to create a line graph showing frequency (percent) distribution of a given variable using line graph.
For instance, if I use "auto" data, how can i show percentage of "rep78" by "foreign" status and for the total sample in the same line graph. And finally I would like to get a single grpah lie the attached example.
Actually, I am trying to do something like:
sysuse auto
histogram mpg if foreign ==1 , discrete percent recast(connected) by/over(foreign, total)
But this is not the correct command. Could you please let me know how I can do this?
Related Posts with Line graph for frequency distribution by categorical variable
Mediation Panel dataDear all, I am currently conducting a fixed effects panel regression in Stata with the following va…
Need assistance with histogram or bar graphI am having difficulty getting a histogram that was fairly easy to do in python with pyplot. I have …
Maximum value per year per ticket?Hi Stata users, Do you know how it is possible to sort on maximum value per year and per ticket? Fo…
Dyadic dataset help!!Hello everyone I would like to request some expert help about how to turn a classic wide format dat…
Importing several sas7bdat files to Stata and saving them in seperate folderHello everyone, I have received ~300 .sas7bdat files that I need to import to Stata and save them a…
Subscribe to:
Post Comments (Atom)
0 Response to Line graph for frequency distribution by categorical variable
Post a Comment