[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: AW: can I get standardized coefficients by standardize variables first?
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
Re: st: AW: can I get standardized coefficients by standardize variables first?
Date
Tue, 3 Mar 2009 23:16:06 +0100
<>
Mandy can read up on this issue in
http://www.stata-journal.com/article.html?article=dm0040
Maybe that drives her happiness even higher?
HTH
Martin
_______________________
----- Original Message -----
From: "Nick Cox" <[email protected]>
To: <[email protected]>
Sent: Tuesday, March 03, 2009 10:39 PM
Subject: RE: st: AW: can I get standardized coefficients by standardize
variables first?
A detail orthogonal to this thread:
ds, not(type string)
is a backwards way of saying
ds, has(type numeric)
The two are equivalent, but some may prefer the direct statement.
Nick
[email protected]
Martin Weiss
So here is an implementation of Eva`s excellent advice as to the causes
of
Mandy`s problem:
*************
clear*
set mem 400m
* enter the percentage of missings here
loc mis 0.01
u http://www.stata-press.com/data/imeus/traffic, clear
foreach var of varlist fatal beertax spircons unrate perincK {
replace `var'=. if runiform()<`mis'
}
qui xtreg fatal beertax spircons unrate perincK, fe
tempvar dummy
g `dummy'=e(sample)
qui ds, not(type string)
foreach var of varlist `r(varlist)'{
egen std`var'=std(`var') if `dummy'
}
xi: reg fatal beertax spircons unrate perincK i.state if `dummy', beta
xtreg stdfatal stdbeertax stdspircons stdunrate stdperincK if `dummy',
fe
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* 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 |