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: DiD
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: DiD
Date
Tue, 29 Mar 2011 19:02:01 +0100
I know little about these designs but the more is explained here, the
more problematic this seems. In addition to several points made
earlier in the thread:
1. These don't look like real data. It would be fine to use fake data
to indicate what you are doing, but you should still explain clearly
whether this example is your real data or not.
2. I can't see that panels only observed for one time belong in the
analysis unless somehow you know that there is no bias in including
them.
Nick
On Tue, Mar 29, 2011 at 6:39 PM, inggrid <[email protected]> wrote:
> Dear Federico,
>
>
> I have changed the variable of treat. As your suggestion, by ignoring year, I give a value of 1 to the individuals with the same id (2000 and 2007). But, STATA still dropped my interaction variable. Indeed, my data sets are unbalanced panel with a larger sample in 2007.
>
> id year y program treat post05 treat_post05
> 1 2000 10 0 0 0 0
> 2 2000 20 0 0 0 0
> 3 2000 30 0 0 0 0
> 4 2000 40 0 1 0 0
> 5 2000 50 0 1 0 0
> 6 2000 60 0 1 0 0
> 1 2007 70 0 0 1 0
> 2 2007 80 0 0 1 0
> 3 2007 90 0 0 1 0
> 4 2007 100 1 1 1 1
> 5 2007 110 1 1 1 1
> 6 2007 120 1 1 1 1
> 7 2007 130 0 0 1 0
> 8 2007 140 0 0 1 0
> 9 2007 150 0 0 1 0
>
> Thanks in advance.
>
>
> Best regards,
> Inggrid
> --- On Tue, 3/29/11, [email protected] <[email protected]> wrote:
>
>> From: [email protected] <[email protected]>
>> Subject: Re: st: DiD
>> To: [email protected]
>> Date: Tuesday, March 29, 2011, 10:33 PM
>> I see many problems. First of all, I
>> would expect an identifier, and to find it twice for each
>> value (1 for year 2000 and 1 for year 2007). The only
>> variable that could be an identifier is "y", but it doesn't
>> respect this charachteristic. Then, you have 3 variables
>> that are absolutely identical ("treat", "program" and
>> "treat_post05"). So these commands:
>>
>> > gen treat=(program!=0)
>> > gen treat_post05 = treat*post05
>>
>> are unuseful because they just generate clones of
>> "program", because "program" is always equal to 1 (when
>> different from 0) and is always equal to 0 for year 2000.
>> Federico
>>
>> ----- Messaggio originale -----
>> Da: inggrid <[email protected]>
>> Data: Tuesday, March 29, 2011 17:13
>> Oggetto: Re: st: DiD
>> A: [email protected]
>>
>> > Hello again,
>> >
>> > I have found my problem. To clarify everything, I am
>> repeating
>> > my case. I have a two period panel data, 2000 and
>> 2007. In 2005,
>> > there was a policy reform. Therefore, I can identify
>> the
>> > participants by using data from 2007. I name it as
>> > "program".Then, the treated group is equal to
>> "program". I
>> > generated treat_post05, an interaction dummy (the
>> treatment
>> > effect).Consequently, treat_post05=treat.
>> >
>> > Here is the example:
>> > year y
>> program treat
>> post05 treat_post05
>> > 2000 10
>> 0 0 0
>> 0
>> > 2000 20
>> 0 0 0
>> 0
>> > 2000 30
>> 0 0 0
>> 0
>> > 2000 40
>> 0 0 0
>> 0
>> > 2000 50
>> 0 0 0
>> 0
>> > 2000 60
>> 0 0 0
>> 0
>> > 2007 70
>> 0 0 1
>> 0
>> > 2007 80
>> 0 0 1
>> 0
>> > 2007 90
>> 0 0 1
>> 0
>> > 2007 100
>> 1 1 1
>> 1
>> > 2007 110
>> 1 1 1
>> 1
>> > 2007 120
>> 1 1 1
>> 1
>> >
>> >
>> > Basically, I can use the the simple t-test. But, I
>> still need to
>> > include some control variables.
>> >
>> > Any idea how to solve this?
>> >
>> > Many thanks beforehand.
>> >
>> > Best regards,
>> > Inggrid
>> >
>> >
>> > --- On Tue, 3/29/11, [email protected]
>>
>> > <[email protected]>
>> wrote:
>> >
>> > > From: [email protected]
>> <[email protected]>
>> > > Subject: Re: st: DiD
>> > > To: "inggrid" <[email protected]>
>> > > Cc: [email protected],
>> [email protected]
>> > > Date: Tuesday, March 29, 2011, 7:06 PM
>> > > > gen post05 = year>2000
>> > > > gen treat_post05 = treat*post05
>> > >
>> > > > note: post05 omitted because of
>> collinearity
>> > > > note: treat_post05 omitted because of
>> collinearity
>> > >
>> > > May be "post05" has been omitted because it's
>> always equal
>> > > to 1, and treat_post05 because it's always equal
>> to "treat".
>> > > I guess you misspecified the condition of post05
>> (it
>> > > shouldn't be "year>2000", but "year>2004"
>> or
>> > > "year>2005").
>> > > Federico
*
* 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/