Statalist


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

Re: st: RE: create predicted values manually using matrices


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: RE: create predicted values manually using matrices
Date   Mon, 23 Nov 2009 13:26:18 -0600

Isn't this the same as:

reg depvar indepvar1 indepvar2
predict yhat
replace yhat = f.hat

Scott

On Mon, Nov 23, 2009 at 1:18 PM, Joshua A. Shindell
<[email protected]> wrote:
> I'm sorry about the lack of clarity in the last email.
>
> I am looking to generate predicted values by multiplying the estimated
> coefficients by a period ahead value of each variable.
>
> The code I am using currently is:
>
> Reg depvar indepvar1 indepvar2
> gen depvar1 =
> _b[_cons]+_b[_indepvar1]*F1.indepvar1+_b[_indepvar2]*F1.indepvar2
>
> Is there code that can automate the process so I don't have to recode
> each generate expression when I change model specification ?
>
>
*
*   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/



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