# A GLM example I - binary response data.
library(refitME)
data(Framinghamdata)
glm_naiv <- glm(Y ~ w1 + z1 + z2 + z3, x = TRUE, family = binomial, data = Framinghamdata)
# The error-contaminated predictor in this example is systolic blood pressure (w1).
sigma.sq.u <- 0.006295 # ME variance, as obtained from Carroll et al. (2006) monograph.
B <- 50 # The number of Monte Carlo replication values.
glm_MCEM <- refitME(glm_naiv, sigma.sq.u, B)
Run the code above in your browser using DataLab