Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: dumb cross-tab question


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: dumb cross-tab question
Date   Thu, 29 Nov 2007 12:19:53 -0000

Depends what you mean by "quick". 

I don't think that this is canned. But it can be done 
directly. 

sysuse auto
egen group = group(for rep78)
gen ub = .
gen lb = .
gen mean = .
gen se = .
qui forval i = 1/8 {
	ci mpg if group == `i'
	replace ub = r(ub) if group == `i'
	replace lb = r(lb) if group == `i'
	replace mean = r(mean) if group == `i'
	replace se = r(se) if group == `i'
}
tabdisp foreign rep78 if group < . , cell(mean se lb ub) format(%2.1f)

Nick
n.j.cox@durham.ac.uk 

E. Paul Wileyto

Is there a quick way to get Stata to format a two-way table showing
means, SEs, and CIs for a third variable?

tabulate summarize doesn't seem to do SEs and CIs

tabstat gets angry if I try to give it two by variables.


*
*   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/



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