in R or SAS, How do I compute binomial models where the interpretation is a risk ratio or risk difference? Or how can I convert the odds to a risk?
I want a model that I can interpret the risk ratio and risk difference when my exposure is binomial and my outcome in binomial. Also as an aside I also want to use IPTW but that can wait.
When should I use link= log or link = logit? should I perform a glm or a logbin? Thanks
model<- glm(outcome~treatment, weights=weight, data=mydata, family=binomial(link=log))
betaiptw<- coef(model)
SE<- sqrt(diag(vcovHC(model, type ="HC0")))
rr<- exp(betaiptw[2])
lcl<- exp(betaiptw[2] -1.96*SE[2])
ucl<- exp(betaiptw[2] +1.96*SE[2])
c(lcl, rr, ucl)