Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Beta coefficients


From   Richard Williams <[email protected]>
To   [email protected], "[email protected]" <[email protected]>
Subject   Re: st: Beta coefficients
Date   Fri, 14 Dec 2012 10:42:46 -0500

With do it yourself approaches keep in mind that the sample used in the estimation command may be different than the full sample (e.g. because of missing data or because you only analyze a subset of the data). You may therefore need to add an if qualifier of some sort, e.g.

gen touse = !missing(y, x1, x2, x3, x4)
egen `x'_mu = mean(`x') if touse

At 10:24 AM 12/14/2012, Sjoerd van Bekkum wrote:
Hello Bülent,

You can alway standardize your coefficients yourself, for instance:

preserve
loc var " yvar xvar1 xvar2 xvar3 xvar4"
foreach x in `var' {
 egen `x'_mu = mean(`x')
 egen `x'_sd = sd(`x')
 replace `x' = (`x'-`x'_mu)/`x'_sd
 drop `x'_mu `x'_sd
}

xtivreg2 y x1 x2 x3 x4 etc etc
restore

This method is quick and dirty, but you can easily embed it into a
program or (a)do file.
Best,
Sjoerd

---

Sjoerd van Bekkum
Assistant Professor of Finance, Erasmus University, Netherlands
W  http://people.few.eur.nl/vanbekkum/    P (+31)-10-4082114   F (+31) 10 -
40 89165




On 14 December 2012 08:40, Bülent Köksal <[email protected]> wrote:
>
> Dear Stata Users,
>
> Is there a way of getting beta coefficients after xtivreg or xtivreg2 ?
>
> I tried using betacoef program but it seems that it does not work
> after xtivreg2.
>
> Thank you.
>
>
> --
> Bülent Köksal
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index