Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: calculation of instability of a variable


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: calculation of instability of a variable
Date   Sat, 9 Apr 2011 00:07:00 +0100

predict e, residual
gen move_e = (e + L.e + L2.e + L3.e + L4.e + L5.e)/6

or whatever variant you want -- your example has e(t-2) twice and a
divisor of 5 for 7 terms.

Nick

On Fri, Apr 8, 2011 at 9:38 PM, Humaira Asad <humairaasad@hotmail.com> wrote:

> I want to find out the mean of residuals=1/5[e(t-5)+e(t-4)+e(t-3)+e(t-2)+e(t-2)+e(t-1)+et]
>
> after regressing fdt=a+bfd(t-1)+year for each of the 107 countries in a panel dataset of 10 time periods each. Is there a short way of doing this.
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index