Hi,
How can I delete the bars in the histogram if there is less or equal to 3 observations?
The histogram should show the age of mothers and fathers when giving birth, but I cannot plot the age if there is less than 3 observations (as this is individual specific data). I have a panel dataset.
My code is as follows:
twoway (hist age if id!=L.id & gender==1, discrete) ///
(hist age if id!=L.id & gender==2, discrete) ///
xtitle("Age") title("Panel A. Age of mothers and fathers at childbirth") ///
legend(rows(1) order(1 "Male" 2 "Femlae")) ///
ylabel( ,grid) ///
noout ///
This gives me the bug: "option noout not allowed".
Many thanks!
Best,
Natasha
Related Posts with Deleting number of observations below 3 in histogram?
-catplot-: Suppress automatic title under x-axis?Dear all, I am creating a graph much like this: Code: sysuse auto, clear catplot rep78, over(forei…
Multiple conditions within loopHello, Stata Users! My question might seem too simple, but I am struggling with generating new vari…
tsline command with maximum observationsDear Stata community, I am running the tsline command for a graph of average male unemployment by c…
Generating a change score variableHi Statalist, I am trying to generate a change score that captures changes in labour force particip…
random fixed effect model of panel dataHi, I am trying to anlysis an (unbalanced) panel data which covers around 6000 companies (79000 fri…
Subscribe to:
Post Comments (Atom)
0 Response to Deleting number of observations below 3 in histogram?
Post a Comment