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]
Re: st: first-difference command
From
Fernando Rios Avila <[email protected]>
To
[email protected]
Subject
Re: st: first-difference command
Date
Fri, 16 Sep 2011 15:39:40 -0400
HI Donsaane,
my question is... have you tryed that option?
I think you shouldnt have anyproblem as long as you do it using bysort
country. Otherwise, you will also be obtaining differences across
countries.
On Fri, Sep 16, 2011 at 3:27 PM, donsaane dontsi <[email protected]> wrote:
> 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/
>
*
* 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/