I am running a logistic regression model and save the estimates to estout. Now for a specific factor in the model I would also like to add the number of observations for each level of the factor.
So for example;
xi: logit dead i.diagnosis
.estout . using "output/table2.xls", cells("b(fmt(%9.1f)) ci(par( ( , ) ))") eform replace
Whereby::
dead (yes=1, no=0)
Diagnosis (leukaemia=1, Hodgkins=2, retinoblastoma=3 etc)
So this gives the estimates and confidence intervals for the factor diagnosis. How do I add the number of observations for each level of the factor diagnosis? So for example:
Diagnosis Number estimate 95%CI
Leukaemia 450 3.0 (2.0,5.0)
Hodgkins 230 4.9 (3.0,8.4)
How do I get a column with the number of observations such as in this example if possible?
Thanks,
Raoul
Raoul Reulen
Cancer Research UK Graduate Training Fellow
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/