I am trying to do a fixed effects estimation for which I need teacher fixed effects, my problem is that when I take teacher fixed effects then invariant variables like gender don't drop out. I have shared a data example for reference, I don't know what I am doing wrong please help.
------------------ copy up to and including the previous line ------------------
--more--
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double child_teachercode byte(teachergender teacherage teachingexper teacheredu) 10104 2 26 3 3 10103 2 24 1 3 10104 2 26 3 3 10103 2 24 1 3 10103 2 24 1 3 10104 2 28 3 3 10103 2 24 1 3 10104 2 26 3 3 10103 2 24 1 3 10104 2 26 3 3 10103 2 24 1 3 10104 2 26 3 3 10104 2 26 3 3 10103 2 24 1 3 10104 2 26 3 3 10103 2 24 1 3 10104 2 26 3 3 10103 2 24 1 3 10104 2 26 3 3 10103 2 24 1 3 10103 2 24 1 3 10104 2 . . . 10103 2 24 1 3 10104 2 26 3 3 10103 2 24 1 3 10104 2 26 3 3 10104 2 26 3 3 10103 2 24 1 3 10103 2 24 1 3 10371 1 22 1 3 10103 2 . . . 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10204 2 54 3 1 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10204 2 54 3 1 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10204 2 54 3 1 10205 2 50 3 2 10204 2 54 3 1 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 59 3 2 10204 2 52 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10204 2 52 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10205 2 50 3 2 10204 2 54 3 1 10205 2 50 3 2 10203 2 40 3 4 10203 2 40 3 4 10203 2 40 3 4 10203 2 40 3 4 10203 2 40 3 4 10203 2 40 3 4 10203 2 40 3 4 10203 2 40 3 4 10203 2 40 3 4 10203 2 40 3 4 10371 1 22 1 3 10351 1 21 1 2 10304 1 40 3 2 10351 1 21 1 2 10304 1 42 3 2 end label values teachergender tr3_s1q2 label def tr3_s1q2 1 "Male", modify label def tr3_s1q2 2 "Female", modify label values teachingexper tr3_s1q4 label def tr3_s1q4 1 "Less than 1 year", modify label def tr3_s1q4 3 "Greater than 3 years", modify label values teacheredu tr3_s1q7 label def tr3_s1q7 1 "<Matric", modify label def tr3_s1q7 2 "Matric", modify label def tr3_s1q7 3 "FA/FSc", modify label def tr3_s1q7 4 "BA/BSc", modify
--more--
Comment