Thanks, Roger.
Still on parmest and parmby, it might be helpful to be able to list with
clist rather than list in order to get rid of Stata's lines.
Fred
At 03:55 PM 7/15/2003 +0100, you wrote:
At 09:17 15/07/03 -0500, Fred Wolfe wrote:
Is there anyway to get -parmby- output to include beta (Beta), as in:
parmby "reg cutdown high pain_ haq_ depress glb age sex edlevel white
inctouse duration, beta", saving(testme, replace) for(estimate min95
max95 %8.2f p %8.1e) li(*)
This is not a simple thing to do, because -regress- does not save any such
estimation result as -e(Beta)-. However, you could always standardise your
Y- and X-variables before doing your regression, as in the following program:
foreach X of var cutdown high pain_ haq_ depress glb age sex edlevel
white inctouse duration {
summ `X'
replace `X'=(`X'-r(mean))/r(sd)
}
parmby "reg cutdown high pain_ haq_ depress glb age sex edlevel white
inctouse duration, beta", saving(testme, replace) for(estimate min95 max95
%8.2f p %8.1e) li(*)
This would code all your Y- and X-variables to a scale of SDs from the
mean, causing -estimate-, -min95- and -max95- to be expressed in Y-axis
SDs per X-axis SD. To eliminate missing values listwise, you might type
instead:
gene byte listmiss=0
foreach X of var cutdown high pain_ haq_ depress glb age sex edlevel
white inctouse duration {
replace listmiss=1 if missing(`X')
}
foreach X of var cutdown high pain_ haq_ depress glb age sex edlevel
white inctouse duration {
replace `X'=. if listmiss
summ `X'
replace `X'=(`X'-r(mean))/r(sd)
}
parmby "reg cutdown high pain_ haq_ depress glb age sex edlevel white
inctouse duration, beta", saving(testme, replace) for(estimate min95 max95
%8.2f p %8.1e) li(*)
This would recode all your X- and Y-variables to missing in observations
where any of the variables were previously missing, or to a scale of SDs
from the mean otherwise, where the SDs and means are from observations not
deleted listwise.
I hope this helps.
Roger
--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://www.kcl-phs.org.uk/rogernewson
Opinions expressed are those of the author, not the institution.
*
* 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/
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/