Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Matrices into variables


From   "R.E. De Hoyos" <[email protected]>
To   <[email protected]>
Subject   st: Re: Matrices into variables
Date   Mon, 31 May 2004 20:07:31 +0100

Dear Andrea,

To generate a variable with one of the e(b) values:

gen beta_var1 = _b[var1]

This will generate a constant.

However I think it is not necessary for you to convert the vector e(b) into
variables.

After estimation of the first equation you can save e(b)
-matrix mymatrix = e(b)-

Then you can use all or SOME of the values of -mymatrix- to estimate
predicted values using a second set of Xs. Imagine that in the second step
you only want to use the first two estimated betas from the first equation.



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