Hi,
I ran a glm model and the exp(b) of the teachereffect_A var as you can see indicates a positive relation. and FYI the range of values of the var goes from negatove to positive.
Below is part of the output table
However, when I calculated the margins, it shows a negative margin. I am a bit confused why the change in direction. could anyone help plz!!!
Thx
I ran a glm model and the exp(b) of the teachereffect_A var as you can see indicates a positive relation. and FYI the range of values of the var goes from negatove to positive.
Below is part of the output table
Code:
Survey: Generalized linear models Number of strata = 31 Number of obs = 1520 Number of PSUs = 185 Population size = 1512.8983 Design df = 154 ----------------------------------------------------------------------------------- | Linearized W4schatYP | exp(b) Std. Err. t P>|t| [95% Conf. Interval] ------------------+---------------------------------------------------------------- 1.IndSchool | .7057381 .0811252 -3.03 0.003 .56237 .8856557 | phaseofEdu | 1 | .8929305 .0484512 -2.09 0.039 .8021672 .9939634 2 | 1.016741 .0275204 0.61 0.541 .9638024 1.072587 | KS4_IDACI_Z_A | 1.03057 .0153974 2.02 0.046 1.000597 1.061441 teachereffect_A | 1.009789 .0010188 9.66 0.000 1.007778 1.011803 Squality_A | 1.000367 .0003837 0.96 0.340 .9996093 1.001125 KS4_CVAP3APS_Z | 1.046751 .015372 3.11 0.002 1.01682 1.077563
Code:
. margins, eyex( teachereffect_A) at((asobserved) teachereffect_A) at((mean) teachereffect_A) vce(unconditional) Average marginal effects Number of obs = 1664 Expression : Predicted mean KS4_PTSTNEWG, predict() ey/ex w.r.t. : teachereffect_A 1._at : (asobserved) 2._at : teachereff~A = -.8258727 (mean) --------------------------------------------------------------------------------- | Linearized | ey/ex Std. Err. t P>|t| [95% Conf. Interval] ----------------+---------------------------------------------------------------- teachereffect_A | _at | 1 | -.0039978 .0027474 -1.46 0.148 -.0094239 .0014284 2 | -.0039978 .0012511 -3.20 0.002 -.0064687 -.0015268 ---------------------------------------------------------------------------------
Comment