# NOT RUN {
## Define a few links with some misclassification
logit_mis <- mis(link = "logit", sensitivity = 0.9, specificity = 0.9)
lizards_f <- cbind(grahami, opalinus) ~ height + diameter + light + time
lizardsML <- glm(lizards_f, family = binomial(logit), data = lizards)
lizardsML_mis <- update(lizardsML, family = binomial(logit_mis),
start = coef(lizardsML))
## A notable change is coefficients is noted here compared to when
## specificity and sensitity are 1
coef(lizardsML)
coef(lizardsML_mis)
## Bias reduction is also possible
update(lizardsML_mis, method = "brglmFit", type = "AS_mean",
start = coef(lizardsML))
update(lizardsML_mis, method = "brglmFit", type = "AS_median",
start = coef(lizardsML))
# }
Run the code above in your browser using DataLab