Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Creating tables


From   Amal Khanolkar <Amal.Khanolkar@ki.se>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Creating tables
Date   Thu, 18 Oct 2012 20:27:20 +0000

Hi,

Is there an easy way to create a summary table in Stata using a single command?

I've used the eststo/esttab to produce tables for linear and logistic regression models.

I have the following that generates summary stats on my study population:

tabstat age_mom ht_cm bmi wghtpre_kg wght_gain gestcalc, by(mom_race2) stat(mean sd n), if parity!=. & gestcalc!=. & cigs_befx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedx!=. & age_mom!=. & ht_cm!=. & bmi!=. & wghtpre_kg!=. & wght_gain!=. & gestcalc!=.

tab mom_race2 edu_mom if parity!=. & gestcalc!=. & cigs_befx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedx!=. & age_mom!=. & ht_cm!=. & bmi!=. & wghtpre_kg!=. & wght_gain!=. & gestcalc!=.
tab mom_race2 marriedx if parity!=. & gestcalc!=. & cigs_befx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedx!=. & age_mom!=. & ht_cm!=. & bmi!=. & wghtpre_kg!=. & wght_gain!=. & gestcalc!=.
tab mom_race2 parity if parity!=. & gestcalc!=. & cigs_befx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedx!=. & age_mom!=. & ht_cm!=. & bmi!=. & wghtpre_kg!=. & wght_gain!=. & gestcalc!=.
tab mom_race2 cigs_befx if parity!=. & gestcalc!=. & cigs_befx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedx!=. & age_mom!=. & ht_cm!=. & bmi!=. & wghtpre_kg!=. & wght_gain!=. & gestcalc!=.
tab mom_race2 gestdb if parity!=. & gestcalc!=. & cigs_befx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedx!=. & age_mom!=. & ht_cm!=. & bmi!=. & wghtpre_kg!=. & wght_gain!=. & gestcalc!=.
tab mom_race2 gesthy if parity!=. & gestcalc!=. & cigs_befx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedx!=. & age_mom!=. & ht_cm!=. & bmi!=. & wghtpre_kg!=. & wght_gain!=. & gestcalc!=.
tab mom_race2 MBMI2 if parity!=. & gestcalc!=. & cigs_befx!=. & gestdb!=. & gesthy!=. & ht_cm!=. & plural==1 & edu_mom!=. & marriedx!=. & age_mom!=. & ht_cm!=. & bmi!=. & wghtpre_kg!=. & wght_gain!=. & gestcalc!=.


Is there a command that can save the above output and produce a single table?

Thanks,

/Amal 
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index