|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: RE: dumb cross-tab question
Thanks. I have similar coding that would do it, but as you show below,
it is not general.... By "quick," I meant the usual Stata one-line command.
P
Nick Cox wrote:
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
[email protected]
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/
--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA 19104-3309
215-746-7147
Fax: 215-746-7140
[email protected]
http://mail.med.upenn.edu/~epw/
*
* 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/