I am trying to run a regression with the following independent variables:
Further we cluster by country and event (one event can be attended by different countries and the perception of the type of one event can differ by country):
and conduct following regressions:
There is no problem with the regression above.
However, as soon as I add a type or multiple types of the event:
the after_* variables get omitted, e.g.:
.
Since the independent variables are not perfectly correlated and assuming the type of event is random, why does it show me a collinearity problem?
Code:
**Treatment: only one event attended; Control: no event attended gen after_event=. replace after_event=1 if before_attendance_count==1 replace after_event=0 if before_attendance_count==0 **the event attended can be divided into type "a", "b" and "c" gen after_a=. replace after_a=0 if before_attendance_count==1 replace after_a=1 if before_attendance_count==1 & event_type=="a" gen after_b=. replace after_b=0 if before_attendance_count==1 replace after_b=1 if before_attendance_count==1 & event_type=="b" gen after_c=. replace after_c=0 if before_attendance_count==1 replace after_c=1 if before_attendance_count==1 & event_type=="c"
Code:
country_event_fixedeffects
Code:
areg dependent_variable after_event, absorb(country_event_fixedeffects)
However, as soon as I add a type or multiple types of the event:
Code:
areg dependent_variable after_event after_a, absorb(country_event_fixedeffects) *or areg dependent_variable after_a after_b after_c, absorb(country_event_fixedeffects)
Code:
*for the first regression above: note:after_event omitted because of collinearity
Since the independent variables are not perfectly correlated and assuming the type of event is random, why does it show me a collinearity problem?
Comment