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: generate Spell Counter or Duration Variable
From
David Ashcraft <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: generate Spell Counter or Duration Variable
Date
Fri, 7 Dec 2012 11:30:56 -0800 (PST)
I am sorry for the confusion: -d- is the dummy variable reflecting change of state from negative to positive (0,1). The final data set would be similar to one appended below.
David
----- Original Message -----
From: Nick Cox <[email protected]>
To: [email protected]
Cc:
Sent: Friday, December 7, 2012 8:18:22 PM
Subject: Re: st: generate Spell Counter or Duration Variable
Somebody else may understand this, but I don't think this is complete.
What's -d-, for example?
Nick
On Fri, Dec 7, 2012 at 4:52 PM, David Ashcraft <[email protected]> wrote:
> Hi Statalist,
>
> I wanted to generate a duration variable to determine, how long a firm remained in a specific state. the dataset is panel where T>N. The change in state of the firm is explained by a dummy variable. The duration variable as shown below capture duration of each spell. I thought of using -xi i.d- but it generate the same variable as -d-.
>
> id date2 d Duration
> 1 16587 1 1
> 1 16617 1 2
> 1 16646 1 3
> 1 16679 0 0
> 1 16709 1 1
> 1 16740 0 0
> 1 16770 1 1
> 1 16800 0 0
> 1 16832 1 1
> 1 16860 0 0
> 1 16891 1 1
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/