Statalist


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

Re: st: Fixed effects with a 'future-lagged' variable


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: Fixed effects with a 'future-lagged' variable
Date   Sun, 15 Feb 2009 09:17:41 -0500

Anna Reimondos <[email protected]>:
You can't easily use this data the way you want and get consistent
estimates--my proposal with -glm- manually including fixed effects via
dummies for individuals is likely no good with 3000 indiv at 3-6
points in time, and -xtreg- is no good with your dependent var.
Probably turning attitude into a dichotomous variable at each point in
time is also no good.  You don't have an exogenous explanatory
variable, and various Wooldridge-type methods to do nonlinear fixed
effects require strict exogeneity--i.e. birth has no effect on
_future_ values of other explanatory variables.  Also--is your sample
all first-time mothers, i.e. they start with no birth, and they all
end with birth==1?  Even a simple comparison of mean attitude the year
before and year after a birth is not straightforward with this kind of
data--you would want some nonparametric stat to take account of the
boundedness of the outcome variable, and your sample selection is a
little tricky (you are less likely to measure attitude after birth for
women who give birth later in the sample period, and you are less
likely to measure attitude before birth for women who give birth
earlier in the sample period, presumably correlated with age at first
birth).

Let me suggest a slightly different research question you might
address with this data.  Suppose you measure the effect of having a
boy or girl on desire to have another child (see also
http://www.nber.org/papers/w10281) --now your explanatory variable
"male born" is arguably exogenous, ignoring moms who terminate a
pregnancy after finding out the sex.  Define y=1 if attitude is higher
the year after a birth than the year before, and zero if the same or
lower.  Now this turns your short panel into a cross-section with
change in attitude (increased desire for children) as a binary
outcome. Even without turning the outcome into a binary outcome and
collapsing the panel into a cross-section, maybe you can use one of
the methods outlined at
http://www.stata.com/meeting/snasug08/abstracts.html#wooldridge
since you now have an exogenous treatment, but I think you still need
to worry about sample selection...

On Sat, Feb 14, 2009 at 8:22 PM, Anna Reimondos <[email protected]> wrote:
> Dear Austin,
> Thanks you for your helpful comments!  Just to give you some more
> information about what I am trying to do, the attitude I am measuring
> is desire to have a child (score of 0-10) and I actually have
> relatively large N (just over 3,000) and small T (unbalanced panel-
> between 3-6 years).
> I tried your suggestion about mapping the trajectory, using dummy
> variables indicating whether this was the first, second, third etc
> year after the child was born. That is just the thing I wanted to do.
> My thinking in using fixed-effects xtreg (I have also tried xtlogit,
> splitting the scores of 0-10 into two groups, one high and one low)
> was that I could control for unobserved heterogeneity and come at
> least a bit closer to finding a causal relationship I.e there may be
> some unobserved characteristics that make some people more likely to
> have children, and these characteristics are likely to be correlated
> with the other variables in the model but by using fixed effects and
> only focusing on within-individual variation we control for that?   I
> tried the glm suggestion too, but that still treats all the
> observations as separate and does not take into account that they are
> clustered within individuals?
> I have a feeling I am missing the plot here....
>
> Thanks again for your help,
> Anna
>
> On Sat, Feb 14, 2009 at 4:58 AM, Austin Nichols <[email protected]> wrote:
>> Anna Reimondos <[email protected]>:
>> First of all, birth is not exogenous to attitude (what is that
>> variable supposed to measure, anyway?).  Second, you cannot use
>> -xtreg- blindly with a (discrete?) bounded dependent variable.  You
>> might get some traction by switching to GLM and redefining attitude as
>> a number between 0 and 1, and regressing y on c0=child born this year,
>> c1=child born last year, etc. to map out the time path of attitude
>> change after birth.  But you still should find some exogenous
>> variation in birth before concluding there is any causal relationship
>> (and exogenous variation in first birth is notoriously difficult--for
>> later births there are some instruments out there).
>>
>> tsset ID Year
>> bys ID (Year): assert child[1]==0
>> by ID: g c0=(child==1 & l.child==0) if !mi(child)
>> forv i=1/9 {
>>  bys ID (Year): g c`i'=l.c`=`i'-1'
>> }
>> egen csum=rowtotal(c?)
>> g clater=child-csum
>> g y=attitude/10
>> qui tab ID, g(_i)
>> glm y c? clater _i*, link(logit) fam(bin) r
>>
>> What N and T do you have in this panel data? I have implicitly been
>> assuming you have few people over long periods of time.
>>
>> See also http://www.stata.com/support/faqs/stat/logit.html on -glm- in
>> this context.
>>
>> On Thu, Feb 12, 2009 at 11:15 PM, Anna Reimondos <[email protected]> wrote:
>>> Hello,
>>> I have fixed effects question I was hoping I could get some help with.
>>> I am estimating a model that looks at changes in attitudes within
>>> individuals over time. I am focusing on individuals who have never had
>>> a child, and I am interested in seeing how attitudes (measured on a
>>> scale from 0 -10 ) change after the birth of a child.
>>>
>>> e.g xtreg attitude child etc, fe
>>>
>>>  I except that attitudes increase slightly after the birth of the
>>> first child, but looking at the data I see that the year the child is
>>> actually born, attitudes fall quite dramatically, but they  do pick up
>>> once the child gets past the first year of age surpassing what they
>>> were before the birth. An example would be (with the data in long
>>> format):
>>>
>>> ID   Year       Child   Child (f-lagged)  Attitude
>>> 1     2001        0          0                     8
>>> 1     2002        0          0                     7
>>> 1     2003        1          0                     2
>>> 1     2004        1          1                     9
>>> 1     2005        1          1                    10
>>>
>>>
>>> In my model I would like to exclude the first year from entering into
>>> the estimation of the effect of having a child because this makes the
>>> coefficient for the dummy variable describing whether there is a child
>>> negative.  I tried to this by having a 'future lagged' variable which
>>> is only equal to 1 if it is at least one year after the birth of the
>>> child (to avoid including the dramatic drop just around the birth of
>>> the child). (see example).
>>>
>>> As I understand fixed effects models, they work by de-meaning the
>>> data, so the mean of all the predictors and the dependent variable is
>>> worked out for each individuals and then at each time point the
>>> observed value is compared with the mean. I am worried that by doing
>>> this, i.e by using the future-lagged variable instead of the normal
>>> child variable, I am pushing the low value just around childbirth
>>> (value of 2 in year 2003) in this case to the wrong side of the dummy
>>> variable artificially making it look like there is a greater positive
>>> change after childbirth than before.
>>> Would it be better to just drop the year out of the analysis
>>> completely? I am worried about  doing this since then I will lose
>>> possible variation in other time-varying variables I am interested in.
>>> Would a dummy variable, which is only equal to 1 for the year the
>>> child was born make more sense instead?
>>>
>>> I hope this question makes sense.
>>> Any advice would be greatly appreciated.
>>>
>>> Anna
*
*   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/



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