I am trying to run a Difference-in-Difference analysis but the treatment variable is collinear against my expectation. The didregress cannot do without specifying a treatment variable.
Below is the data using dataex:
Below is the output I am getting:
I want to use didregress because it allows for factor-variable covariates unlike ieddtab.
I will appreciate your kind suggestions.
Below is the data using dataex:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float selfefficacy byte(highschatt ethnicity numpartners liveinpartner) float treatment byte facility float dummy 26 3 2 . 2 1 12 1 20 3 2 . 2 0 10 1 36 4 1 . . 0 5 1 23 5 1 . 2 1 3 1 31 4 2 . 2 0 4 1 32 4 1 . . 0 6 1 29 4 1 . 2 1 1 1 22 4 1 . . 0 5 1 23 4 2 . 2 0 8 1 30 4 1 . . 0 5 1 21 4 1 . . 0 5 1 29 2 2 . 2 0 4 1 27 4 1 . . 0 5 1 22 5 2 . 1 1 2 1 35 4 1 . . 0 6 1 25 3 1 . . 0 6 1 29 4 2 . 2 1 7 1 25 4 1 . . 0 5 1 28 4 1 . . 0 5 1 36 4 2 . 2 1 12 1 27 4 1 . . 1 3 1 27 4 2 . 2 1 11 1 27 4 2 . 2 0 8 1 28 3 2 . 2 1 7 1 35 4 1 . 2 1 1 1 20 3 1 . . 0 5 1 30 3 2 . 2 1 2 1 25 4 1 . . 0 5 1 28 4 1 . 2 1 9 1 27 2 2 2 1 0 4 1 26 2 2 . 1 0 8 1 36 4 2 . 2 1 2 1 21 4 2 . 2 1 12 1 32 4 1 . . 0 5 1 27 4 2 . 2 1 7 1 27 4 1 . . 1 3 1 36 4 2 2 2 1 2 1 891 4 1 . . 1 3 1 24 4 1 . . 0 6 1 32 5 1 . . 1 1 1 21 4 1 . . 0 6 1 27 4 2 . 2 1 2 1 36 4 2 . . 1 7 1 35 4 1 . . 1 1 1 31 1 2 . 2 0 4 1 15 3 2 . 2 0 8 1 25 4 3 . 2 0 10 1 31 4 1 . 2 0 6 1 31 4 2 . 2 1 12 1 35 5 3 . 2 0 8 1 32 4 2 . 2 1 11 1 32 4 2 . 1 1 7 1 34 4 1 . 2 1 9 1 29 4 1 . . 1 3 1 23 4 1 . . 1 3 1 29 2 1 . . 0 5 1 36 4 2 . 2 0 8 1 36 1 2 . 2 0 4 1 29 4 1 . . 1 9 1 29 5 1 . . 0 5 1 23 4 1 . . 1 3 1 28 3 1 . . 0 5 1 28 4 1 . . 1 3 1 25 3 2 . 2 1 2 1 36 4 1 . . 1 9 1 24 4 2 . 2 1 11 1 28 4 2 . 1 1 12 1 28 4 1 . . 0 5 1 36 4 2 . 2 1 11 1 34 3 2 2 2 1 11 1 30 2 2 . 2 0 4 1 30 1 2 . 2 0 4 1 36 4 2 . . 1 7 1 22 4 2 . 2 0 8 1 26 4 2 . 2 1 12 1 35 4 2 . 2 1 2 1 19 4 1 . . 1 3 1 31 2 2 . 2 0 4 1 36 4 1 . . 0 6 1 27 4 1 . . 1 9 1 36 4 1 . . 1 1 1 24 3 1 . . 0 6 1 23 4 2 . 2 1 11 1 33 3 2 . 1 1 7 1 23 4 1 . . 1 1 1 35 . 5 2 1 0 10 1 28 4 2 . 2 1 7 1 28 4 1 . 2 1 3 1 30 3 1 . . 0 6 1 28 4 2 . 2 1 2 1 36 4 2 . 2 1 12 1 30 4 1 . . 1 9 1 28 5 2 . . 1 2 1 30 4 2 . 2 0 10 1 27 4 1 . . 0 5 1 23 4 1 . . 1 3 1 27 3 4 . . 0 6 1 27 4 2 . . 1 11 1 36 4 2 . 1 1 11 1 36 4 1 . . 1 9 1 end label values highschatt highschatt label def highschatt 1 "Islamiyyah", modify label def highschatt 2 "Primary", modify label def highschatt 3 " JSS", modify label def highschatt 4 "SSS", modify label def highschatt 5 "Higher", modify label values ethnicity ethnicity label def ethnicity 1 "Yoruba", modify label def ethnicity 2 "Hausa", modify label def ethnicity 3 "Fulani", modify label def ethnicity 4 "Igbo", modify label def ethnicity 5 "Others", modify label values numpartners numpartners label def numpartners 2 "Two Live-in Partner", modify label values liveinpartner liveinpartner label def liveinpartner 1 "Yes", modify label def liveinpartner 2 "No", modify label values facility facility label def facility 1 "Atan PHC", modify label def facility 2 "Baban dodo PHC", modify label def facility 3 "Etere PHC", modify label def facility 4 "Jaji PHC", modify label def facility 5 "Kugba PHC", modify label def facility 6 "Kuto PHC", modify label def facility 7 "Kwata PHC", modify label def facility 8 "Mando PHC", modify label def facility 9 "Otun PHC", modify label def facility 10 "Rigachikun PHC", modify label def facility 11 "Samaru PHC", modify label def facility 12 "Tudun Wada", modify
Below is the output I am getting:
Code:
. didregress (selfefficacy i.highschatt i.ethnicity i.numpartners i.liveinpartner) ///
> (treatment), group(facility) time(dummy) level(95) aeq aggregate(dlang,constant)
note: treatment omitted because of collinearity.
model is not identified
The treatment variable treatment was omitted because of collinearity.
I will appreciate your kind suggestions.

Comment