Statalist


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

st: manual first differencing


From   Nola Agha <nolaa@sportmgt.umass.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: manual first differencing
Date   Mon, 16 Mar 2009 11:50:18 -0400

Hi -
   I'd like to first difference all of the variables in my equation.  I have a
panel dataset which is -xtset dmaid year-.  The following command seems to work
quite well for one of my variables:

by dmaid, sort: generate fdpop=pop[_n]-pop[_n-1]

I'm wondering:

a) if there is a built-in command to do this for an entire equation (as opposed
to doing it variable by variable)?

b) if not, if there is a way to automate this procedure for all of my (many)
variables?

Thanks,
Nola



*
*   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   |   What's new   |   Site index