A direct probability model for regression with a binary outcome from observational data.
blm(formula, data, na.action = na.omit, weights = NULL, strata = NULL, par.init = NULL, warn=FALSE,...)
event~x1+x2+...
formula
FALSE
suppresses warnings when testing for feasible parameters.constrOptim
blm
.
blm
model coefficients are the solutions to the maximum of a pseudo log-likelihood using a constrained optimization algorithm with an adaptive barrier method, constrOptim
(Lange, 2010). Variance estimates are based on Taylor linearization (Shah, 2002). When weights
are not NULL, it is assumed that the study is a case-control design.Kovalchik S, Varadhan R (2013). Fitting Additive Binomial Regression Models with the R Package blm. Journal of Statistical Software, 54(1), 1-18. URL: http://www.jstatsoft.org/v54/i01/.
Lange, K. (2010) Numerical Analysis for Statisticians, Springer.
Shah, BV. (2002) Calculus of Taylor deviations. Joint Statistical Meetings.
data(ccdata) fit <- blm(y~female+packyear, weights = ccdata$w,strata=ccdata$strata, data=ccdata) summary(fit) data(aarp) # ABSOLUTE RISK OF BLADDER CANCER BY 70 YEARS # FOR DIFFERENT GENDER AND RISK GROUP fit <- blm(bladder70~female * smoke_status, data = aarp, weight=aarp$w) logLik(fit) # INTERCEPT IS BASELINE RISK # ALL OTHER COEFFICIENTS ARE RISK DIFFERENCES FROM BASELINE summary(fit) # RISK DIFFERENCE CONFIDENCE INTERVALS (PER 1,000 PERSONS) confint(fit)*1000