Hello!
I am trying to assess the non-inferiority of one group against another using confidence intervals. To compute the risk difference & CI of the proportion with success between the groups I have been using prtest:
I now want to extend the model adjusting for various covariates. As a basic model, I have tried used a logit model (followed by margins) or a glm with the identity link:
Both models give me the same result & 95%CI as the prtest command.
If I then add covariates, such as c.age, i.gender, etc - the RD & the 95%CI differ if I generate this immediately using the glm model or using logit followed by margins.
Apologies for my ignorance, but could someone help explain this difference to me? Is it something to do with the covariate values at which the margins are estimated?
Thank you for any help!
I am trying to assess the non-inferiority of one group against another using confidence intervals. To compute the risk difference & CI of the proportion with success between the groups I have been using prtest:
Code:
prtest success, by(group)
Code:
logit success i.group margins, dydx(group) glm success i.group, fam(bin) link(identity)
If I then add covariates, such as c.age, i.gender, etc - the RD & the 95%CI differ if I generate this immediately using the glm model or using logit followed by margins.
Code:
logit success i.group c.age i.gender margins, dydx(group) glm success i.group c.age i.gender, fam(bin) link(identity)
Thank you for any help!
Comment