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/