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: first-difference command
From
donsaane dontsi <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: first-difference command
Date
Fri, 16 Sep 2011 20:27:14 +0100 (BST)
Thanks Austin,
Maybe I was misunderstood. My panel dataset is sort by
year, so I have :
firmcode year
1 2006
1 2009
2 2006
2 2009
I want to first-difference all my variables in order to
be x[2006-2009]
Can I just do: gen dx=x-x[_n-1]
Thanks for the help
dsd
*
* 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/