From | Fred Wolfe <[email protected]> |
To | [email protected] |
Subject | Re: st: RE: RE: RE: ci, return lists, and statsby commands |
Date | Fri, 03 Oct 2003 18:07:02 -0500 |
One possible other way might be to use -parmby- (part of tthe -parmest- package) instead of -statsby-, and to use the -regress- command to generate the means for each variable, and then to use -dsconcat- to concatenate the output data sets for each variable. For instance, John might write a programHere's one way. Another way would be to do -statsby- separately for each variable and -merge- the results. Another way would be to -stack- your responses into one variable and then apply -statsby-. There are, no doubt, yet other ways.
local i1=0
foreach X of var price mpg weight length {
local i1=`i1'+1
tempfile tf`i1'
parmby "regress `X'", saving(`tf`i1',replace) ylabel
}
dsconcat `tf1' `tf2' `tf3' `tf4'
gene foldrange=max95/min95
This will create a data set in the memory with 1 observation per variable and data on parameter estimates, confidence limits, P-values and fold ranges, overwriting the existing data. Optionally, the user can also save other estimation results, such as sample numbers.
To find out more about the -parmest- and -dsconcat- packages, type -ssc desc parmest- or -ssc desc dsconcat- inside Stata. More information about these and other packages for post-processing results can be found in Newson (2003), which can be downloaded as a pre-publication draft from my website at
http://www.kcl-phs.org.uk/rogernewson/
either using a browser or using the Stata -net- command.
I hope this helps.
Roger
Fred Wolfe National Data Bank for Rheumatic Diseases Wichita, Kansas Tel (316) 263-2125 Fax (316) 263-0761 [email protected] * * 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–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |