Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: can I get standardized coefficients by standardize variables first?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: can I get standardized coefficients by standardize variables first?
Date   Tue, 3 Mar 2009 19:35:05 +0100

<> 

In this example borrowed from Baum (2006)
(http://www.stata-press.com/books/imeus.html),
 they coincide 100%


*************
clear*
set mem 400m
u http://www.stata-press.com/data/imeus/traffic, clear
qui ds, not(type string)
foreach var of varlist `r(varlist)'{
egen std`var'=std(`var')
}
xi: reg fatal beertax spircons unrate perincK i.state, beta
xtreg stdfatal stdbeertax stdspircons stdunrate stdperincK, fe
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Mandy fu
Gesendet: Dienstag, 3. März 2009 18:51
An: [email protected]
Betreff: st: can I get standardized coefficients by standardize variables
first?

Hi all,

I'm running some panal data. So the commands I 'll use are something
like -xtreg , fe-, or -xtreg,re-. Since the beta coeffients
(standardized coefficients) are not an option for xtreg command, I
tried to standardize all the variables in the whole data set first
and then use the panel data methods on the standardized variables:
-------------
.local var y x1 x2 x3 x4
.egen new_`var'=std(`var')
.xtreg `var',fe
---------------
But the results are different from using the beta coefficients got
from an OLS regression adding dummy variables to indicate  the group
variable i for the panel data.
-----------------------------------------
**dummy1,dummy2,..dummyn are the dummy vriables based on group i.
.reg y x1 x2 x3 x4 dummy*,b
-----------------------------------------
Could someone give me some hints why the results from these two ways
are different? Is it a correct way to get beta coefficents by
standardized variables first and then use the regular commands?

Thanks a lot in advance!

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