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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

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

Date |
Tue, 3 Mar 2009 23:35:46 +0100 |

<>

*********** tempvar unif g `unif'=runiform()<0.01 foreach var of varlist fatal beertax spircons unrate perincK { replace `var'=. if `unif' } *********** so that the same rows get hit... HTH Martin _______________________

To: <statalist@hsphsun2.harvard.edu> Sent: Tuesday, March 03, 2009 10:11 PM

<>So here is an implementation of Eva`s excellent advice as to the causes ofMandy`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 ************* HTH Martin _______________________----- Original Message -----From: "Mandy fu" <mandy.fu1@gmail.com>To: <statalist@hsphsun2.harvard.edu> Sent: Tuesday, March 03, 2009 9:40 PMSubject: Re: st: AW: can I get standardized coefficients by standardizevariables first?Dear Mr. Weiss, Thanks for providing the example data. I really like the idea of checking different percentage of missing to compare the results from the two methods. This is what's shown when changing the percentage of missing: ------------------------------------------------------------------- when missing percentage is zero: coincide when missing percentage is 0.01: differences are very small when missing percentage is 0.01: differences are still small when missing percentage is 0.3: differences are obviously larger ---------------------------------------------------------------- So, I'm thinking this shows well that the missing values explains the differences of the two methods. They give the same results when adjusting the missing values. Thanks ! 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/

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

**References**:**st: can I get standardized coefficients by standardize variables first?***From:*Mandy fu <mandy.fu1@gmail.com>

**Re: st: AW: can I get standardized coefficients by standardize variables first?***From:*Mandy fu <mandy.fu1@gmail.com>

**Re: st: AW: can I get standardized coefficients by standardize variables first?***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**Re: st: AW: can I get standardized coefficients by standardize variables first?***From:*Mandy fu <mandy.fu1@gmail.com>

**Re: st: AW: can I get standardized coefficients by standardize variables first?***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**st: RE: Maximize a function that contains an integral** - Next by Date:
**Re: st: AW: can I get standardized coefficients by standardize variables first?** - Previous by thread:
**Re: st: AW: can I get standardized coefficients by standardize variables first?** - Next by thread:
**Re: st: AW: can I get standardized coefficients by standardize variables first?** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |