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" <>
To   <>
Subject   st: Re: Matrices into variables
Date   Mon, 31 May 2004 20:13:26 +0100

(The message was cutted in the firts attempt, here it goes again)

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

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–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index