logRegMAR | R Documentation |
This function allows users to fit logistic regression models with incomplete predictors that are categorical. The model is fitted using a new likelihood-based method, which ensures reliable parameter estimation even when dealing with missing data. For more information on the underlying methodology, please refer to Pradhan, Nychka, and Bandyopadhyay (2024).
logRegMAR(formula, data, conflev = 0.95, correctn = TRUE, verbose = TRUE)
formula |
A formula expression as for regression models, of the form |
data |
Input data for fitting the model |
conflev |
Confidence level, the default is 0.95 |
correctn |
a TRUE or FALSE value, by default it is TRUE. |
verbose |
a TRUE or FALSE value, default is verbose = TRUE |
return the logistic regression estimates
Firth, D. (1993). Bias reduction of maximum likelihood estimates, Biometrika, 80, 27-38. doi:10.2307/2336755.
Kosmidis, I., Firth, D. (2021). Jeffreys-prior penalty, finiteness and shrinkage in binomial-response generalized linear models. Biometrika, 108, 71-82. doi:10.1093/biomet/asaa052.
Pradhan, V., Nychka, D. and Bandyopadhyay, S. (2025). Bridging Gaps in Logistic Regression: Tackling Missing Categorical Covariates with a New Likelihood Method (to be submitted).
Pradhan, V., Nychka, D. and Bandyopadhyay, S. (2025). glmFitMiss: Binary Regression with Missing Data in R (to be submitted)
# -----------------Example 1: Metastatic Melanoma --------------------------
est1 <- logRegMAR (failcens ~ size+type+nodal+age+sex+trt,
data = metastmelanoma, conflev = 0.95, correctn = FALSE)
est1
# -----------------Bias reduced estimates due to Firth (1993) --------------
est2 <- logRegMAR (failcens ~ size+type+nodal+age+sex+trt,
data = metastmelanoma, conflev = 0.95, correctn = TRUE)
est2
# -----------------Bias reduced estimates due to Firth (1993) --------------
est2 <- logRegMAR (CaseCntrl ~ Numnill+Numsleep+Smoke+Set+Reftime,
data=meningitis, conflev = 0.95, correctn = TRUE)
est2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.