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

st: manual first differencing

From   Nola Agha <>
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)


*   For searches and help try:

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