Hello, I'm not a Stata user so I'm trying to reproduce Stata results that are given to me in R. I would like to use a GLM with a complementary log-log function. The stata code I have is: glm c IndA fia, family(binomial s) link(cloglog) offset(offset) The R code is: glmt <- glm(data=dataset, c ~ IndA + fia, offset = offset, family = binomial(link = cloglog)) Which yields different results from the Stata output. I think the difference is in the variable s that is included in the binomial family in Stata (bold in the code). How can I incorporate this variable in the R code? Thanks in advance! [[alternative HTML version deleted]]
Floor Biemans <floor_biemans <at> hotmail.com> writes: [snip]> The stata code I have is: > > glm c IndA fia, family(binomial s) link(cloglog) offset(offset) > > The R code is: > > glmt <- glm(data=dataset, c ~ IndA + fia, offset = offset, family binomial(link = cloglog)) > > Which yields different results from the Stata output. > I think the difference is in the variable s that is > included in the binomial family in Stata (bold in the code). > How can I incorporate this variable in the R > code?Cross-posted to stack overflow: stackoverflow.com/questions/20094074/reproduce-stata-code-in-r-binomial-glm/20094514#20094514 glmt <- glm(data=dataset, cbind(c,s-c) ~ IndA + fia, offset = offset, family = binomial(link = cloglog))