Dear all
I am having a problem with the svy prefix which i cannot explain. More specifically i svyset my data and then i run a regression of the kind:
svy: glm outcome i.var1##i.var2 var3 var4 var5, family(gamma) link(identity)
margins r.var1, over(var2)
Please note that both var1 and var2 are binary. However when i run:
tab var2, gen(var2)
svy, subpop(var21): glm outcome i.var1 var3 var4 var5, family(gamma) link(identity)
svy, subpop(var22): glm outcome i.var1 var3 var4 var5, family(gamma) link(identity)
i get considerably different coefficients for var1. Is this normal? Shouldn't both approaches produce the same results?
Thank you
Cynthia
I am having a problem with the svy prefix which i cannot explain. More specifically i svyset my data and then i run a regression of the kind:
svy: glm outcome i.var1##i.var2 var3 var4 var5, family(gamma) link(identity)
margins r.var1, over(var2)
Please note that both var1 and var2 are binary. However when i run:
tab var2, gen(var2)
svy, subpop(var21): glm outcome i.var1 var3 var4 var5, family(gamma) link(identity)
svy, subpop(var22): glm outcome i.var1 var3 var4 var5, family(gamma) link(identity)
i get considerably different coefficients for var1. Is this normal? Shouldn't both approaches produce the same results?
Thank you
Cynthia
Comment