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]

st: Generate a more complex lagged variable


From   Ari Dothan <[email protected]>
To   statalist <[email protected]>
Subject   st: Generate a more complex lagged variable
Date   Tue, 1 Feb 2011 18:30:21 +0200

Hi all,
In the formula H_t=a*H_t-1+(1-a)*P_t-1, P is an existing variable per firm/year.
Assuming that H[2]=P[1], and taking a=0.1: How can I build the column
of H_t by firm?
Since it understands [x] as weights, Stata indicates that "weights are
not allowed", so my problem becomes the specific calculation of each
observation in the H_t column.
Can anyone suggest a solution
Thanks very much

-- 
Ari Dothan
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index