3

Here's the sample data: Link to a .csv file

To briefly explain this: grandparent is 1 if the individual is a grandparent and 0 if otherwise. m_age is the individual's age. m_work is the individual's working status and m_workhour is the individual's weekly working hours. child1_female indicates whether the individual's first child is female. child_number is the number of children that the individual has.

I try to use fixest package to do instrumental variable fix effects regression. The variable grandparent is endogenous and its instrument is child1_female. The outcome variable is m_work. However, if I add m_age as the exogenous regressor and use the following code:

ivgrandma<-feols(m_work~m_age|respondent_id+year|grandparent~child1_female,grandma)

It says that "The endogenous regressor 'fit_grandparent' have been removed because of collinearity (see $collin.var)."

I'm very confused about where the collinearity comes from.

Ludwig Gershwin
  • 303
  • 1
  • 4

1 Answers1

6

I suspect now, having looked through the csv that this arises because you are including respondent fixed effects. Note that your instrument, child1_female, only varies at the respondent level, so if you have respondent_id as a fixed effect, that will absorb all variation in child1_female. To see why, remember, including respondent_id fixed effects is equivalent to estimating a regression where you add indicator variables corresponding to each unique respondent_id as a control. Since child1_female takes on the same value for each observation corresponding to the same respondent, these indicators for respondent_id will clearly completely predict child1_female, hence your collinearity problem.

More generally, whenever you are estimating a panel regression, you will not be able to separately fit coefficients for any variable does not exhibit within-individual variation.

stats_model
  • 2,425