Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Importing beta coefficients from other softwares


From   Richard Williams <[email protected]>
To   [email protected], <[email protected]>
Subject   Re: st: Importing beta coefficients from other softwares
Date   Wed, 28 May 2008 12:17:20 -0500

At 10:56 AM 5/28/2008, Yaseen Ghulam wrote:
Thanks Richard. I agree with you that one option is to run the routine
in stata. But unfortunately stata does not support some methods which I
am using or will need lot of programming which I am not comfortable.
To be specific I am interesting in using lincom and nlcom routines. I
feel that if I can bring beta, standard error into stata etc. then I
should be able to use these functions. But I am not sure where to put
these information in stata system file which nlcom can use. Thanks again
for the response.

Yaseen Ghulam
Again, if it is a method not supported by Stata, I am not sure you can do it. But in any event, the erepost command gives you a lot of power. In this example, I show how the predicted values would change if the coefficient for foreign were different:

. sysuse auto
(1978 Automobile Data)

. reg weight foreign

Source | SS df MS Number of obs = 74
-------------+------------------------------ F( 1, 72) = 39.02
Model | 15496779.3 1 15496779.3 Prob > F = 0.0000
Residual | 28597399.1 72 397186.099 R-squared = 0.3514
-------------+------------------------------ Adj R-squared = 0.3424
Total | 44094178.4 73 604029.841 Root MSE = 630.23

------------------------------------------------------------------------------
weight | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
foreign | -1001.206 160.2876 -6.25 0.000 -1320.734 -681.6788
_cons | 3317.115 87.39676 37.95 0.000 3142.893 3491.338
------------------------------------------------------------------------------

. predict xb1
(option xb assumed; fitted values)

. mat b = e(b)

. mat b[1,1] = -1200

. erepost b = b

. predict xb2
(option xb assumed; fitted values)

. sum xb1 xb2

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
xb1 | 74 3019.46 460.7436 2315.909 3317.115
xb2 | 74 2960.359 552.2262 2117.115 3317.115






-------------------------------------------
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/support/faqs/res/findit.html
* 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