I am looking to run a regression following using panel data in which the same individuals are observed across time. I have tried running it on R
, but I get errors, probably because of colinearity issues.
My model is such that I have two time periods, lets say T = 0 and T = 1 and two groups, lets say Control and Treatment.
My main independent variable X is such that on T = 1 it is equal to 0 for all observations. On T = 0, it is equal to 0 for the Control groups and greater than 0 for the Treatment units.
Is there perfect colinearity? How can I fix this?
Edit: I apologize for not giving more details of my issue.
I am studying the effects of a change of campaign finance legislation on Brazilian local elections. In 2015 the law was changed, so that companies could not make any more donations to candidates. What I intend to do is to check whether candidates who once had greater proportion of their funds coming from corporate money were significantly more affected on the elections after the change in Legislation in comparison to other candidates.
To do this I run regressions like this:
$$ Vote\_Percentage = a_0 + a_1*Time_t + a_2*Campaign\_Proportion_{it} + a_3*Time_t*Corporate\_Proportion_{it} + \delta*X'_{it} + \epsilon_{it} $$
$X$ is a vector with controls, such as the candidate's personal characteristics. As you can notice, on t = 1, $Campaign\_Proportion$ will be 0 for all candidates.
Running a regression like this on R
, I could not obtain a value for the interaction coefficient, getting an NA
as a response. On the other hand, I do not get any of these errors when running this regression on first-differences.
Why do I have this NA
thing?
R
"? Exactly what error messages are produced? $\endgroup$