Title: | Bias Reduction with Missing Binary Response |
---|---|
Description: | Provides two main functions, il() and fil(). The il() function implements the EM algorithm developed by Ibrahim and Lipsitz (1996) <DOI:10.2307/2533068> to estimate the parameters of a logistic regression model with the missing response when the missing data mechanism is nonignorable. The fil() function implements the algorithm proposed by Maity et. al. (2017+) <https://github.com/arnabkrmaity/brlrmr> to reduce the bias produced by the method of Ibrahim and Lipsitz (1996) <DOI:10.2307/2533068>. |
Authors: | Arnab Maity [aut, cre], Vivek Pradhan [aut], Ujjwal Das [aut] |
Maintainer: | Arnab Maity <[email protected]> |
License: | GPL-3 |
Version: | 0.1.7 |
Built: | 2025-01-25 02:47:42 UTC |
Source: | https://github.com/cran/brlrmr |
It is called by the main function fil and is for internal use.
em.fil(parameter, X, full.missing.data, observed.data, full.data, family)
em.fil(parameter, X, full.missing.data, observed.data, full.data, family)
parameter |
The starting values of the parameters as ( |
X |
The design matrix with the intercept column. |
full.missing.data |
The augmented response with design matrix and missing indicator 1 for missing data. |
observed.data |
The observed response with design matrix and missing indicator 0 for observed data. |
full.data |
The observed response, augmented response with corresponding design matrix and missing indicator 0 for observed data and 1 for missing data. |
family |
as in |
Bias Reduction in Logistic Regression with Missing Responses when the Missing Data Mechanism is Nonignorable.
It is called by the main function fil and is for internal use.
em.fil.interaction(parameter, X, full.missing.data, observed.data, full.data, k, family)
em.fil.interaction(parameter, X, full.missing.data, observed.data, full.data, k, family)
parameter |
The starting values of the parameters as ( |
X |
The design matrix with the intercept column. |
full.missing.data |
The augmented response with design matrix and missing indicator 1 for missing data. |
observed.data |
The observed response with design matrix and missing indicator 0 for observed data. |
full.data |
The observed response, augmented response with corresponding design matrix and missing indicator 0 for observed data and 1 for missing data. |
k |
If interaction is present in the missing data model, then the k is the column number of covariate matrix which has interaction with the response. |
family |
as in |
Bias Reduction in Logistic Regression with Missing Responses when the Missing Data Mechanism is Nonignorable.
It is called by the main function fil and is for internal use.
em.il(parameter, X, full.missing.data, observed.data, full.data, family)
em.il(parameter, X, full.missing.data, observed.data, full.data, family)
parameter |
The starting values of the parameters as ( |
X |
The design matrix with the intercept column. |
full.missing.data |
The augmented response with design matrix and missing indicator 1 for missing data. |
observed.data |
The observed response with design matrix and missing indicator 0 for observed data. |
full.data |
The observed response, augmented response with corresponding design matrix and missing indicator 0 for observed data and 1 for missing data. |
family |
as in |
Bias Reduction in Logistic Regression with Missing Responses when the Missing Data Mechanism is Nonignorable.
It is called by the main function fil and is for internal use.
em.il.interaction(parameter, X, full.missing.data, observed.data, full.data, k, family)
em.il.interaction(parameter, X, full.missing.data, observed.data, full.data, k, family)
parameter |
The starting values of the parameters as ( |
X |
The design matrix with the intercept column. |
full.missing.data |
The augmented response with design matrix and missing indicator 1 for missing data. |
observed.data |
The observed response with design matrix and missing indicator 0 for observed data. |
full.data |
The observed response, augmented response with corresponding design matrix and missing indicator 0 for observed data and 1 for missing data. |
k |
If interaction is present in the missing data model, then the k is the column number of covariate matrix which has interaction with the response. |
family |
as in |
Bias Reduction in Logistic Regression with Missing Responses when the Missing Data Mechanism is Nonignorable.
This provides the estimates using IL method and FIL method as described in the reference.
fil(formula, data, parameter = NULL, family = binomial, alpha = 0.05, interaction = FALSE, k = NULL, na.action)
fil(formula, data, parameter = NULL, family = binomial, alpha = 0.05, interaction = FALSE, k = NULL, na.action)
formula |
as in |
data |
as in |
parameter |
The starting values of the parameters as ( |
family |
as in |
alpha |
This is used for upper 100(1 - alpha)% point of standard Normal distribution. The default is 1.96. |
interaction |
TRUE or FALSE, whether to consider interaction in the missing data model. Currenly only one intercation between response and covariates is supported. FALSE by default. |
k |
Which covariate has interaction with response. Takes integer values. User must assign a value if interaction = TRUE. |
na.action |
as in |
n |
number of observations. |
nmissing |
the number of missing observations. |
missing.proportion |
proportion of missing observations. |
beta.hat |
parameter estimate of logistic regression of y on x using FIL method. |
beta.se.hat |
standard error using FIL method. |
z.value |
Wald Z value using FIL method. |
p.value |
p value using FIL method. |
significance.beta.firth |
indicator output whether regressors are significant using FIL method, 1 if significant and 0 if not significant. |
LCL |
Lower Confidence Limits of 100(1 - alpha)% Confidence Intervals. |
UCL |
Upper Confidence Limits of 100(1 - alpha)% Confidence Intervals. |
alpha.hat |
parameter estimate due to missing model using FIL. |
alpha.se.hat |
standard error of the them. |
z.value.alpha |
Wald Z value for them. |
p.value.alpha |
p values for them. |
Bias Reduction in Logistic Regression with Missing Responses when the Missing Data Mechanism is Nonignorable.
## Not run: ############################################# ########### Simulated Example ############### ############################################# data(simulated.data) # load simulated data # parameter definition beta0 <- 1 beta1 <- 1 beta2 <- 1 beta3 <- 1 beta4 <- 1 # parameter definition for missing indicator alpha0 <- -1.1 alpha1 <- -1 alpha2 <- 1 alpha3 <- 1 alpha4 <- 1 alpha5 <- -1 parameter <- c(beta0, beta1, beta2, beta3, beta4, alpha0, alpha1, alpha2, alpha3, alpha4, alpha5) fil(y ~ x1 + x2 + x3 + x4, data = simulated.data, parameter, family = binomial(link = "logit"), na.action = na.pass) ## End(Not run) ############################################# ##### Real data example with separation ##### ############################################# data(nhanes) # load nhanes data fil(hyp ~ age2 + age3, data = nhanes, family = binomial(link = "logit"), na.action = na.pass) data(incontinence) # load nhanes data fil(y ~ x1 + x2 + x3, data = incontinence, family = binomial(link = "logit"), na.action = na.pass)
## Not run: ############################################# ########### Simulated Example ############### ############################################# data(simulated.data) # load simulated data # parameter definition beta0 <- 1 beta1 <- 1 beta2 <- 1 beta3 <- 1 beta4 <- 1 # parameter definition for missing indicator alpha0 <- -1.1 alpha1 <- -1 alpha2 <- 1 alpha3 <- 1 alpha4 <- 1 alpha5 <- -1 parameter <- c(beta0, beta1, beta2, beta3, beta4, alpha0, alpha1, alpha2, alpha3, alpha4, alpha5) fil(y ~ x1 + x2 + x3 + x4, data = simulated.data, parameter, family = binomial(link = "logit"), na.action = na.pass) ## End(Not run) ############################################# ##### Real data example with separation ##### ############################################# data(nhanes) # load nhanes data fil(hyp ~ age2 + age3, data = nhanes, family = binomial(link = "logit"), na.action = na.pass) data(incontinence) # load nhanes data fil(y ~ x1 + x2 + x3, data = incontinence, family = binomial(link = "logit"), na.action = na.pass)
This provides the estimates using IL method as described in the reference.
il(formula, data, parameter = NULL, family = binomial, alpha = 0.05, interaction = FALSE, k = NULL, na.action)
il(formula, data, parameter = NULL, family = binomial, alpha = 0.05, interaction = FALSE, k = NULL, na.action)
formula |
as in |
data |
as in |
parameter |
The starting values of the parameters as ( |
family |
as in |
alpha |
This is used for upper 100(1 - alpha)% point of standard Normal distribution. The default is 1.96. |
interaction |
TRUE or FALSE, whether to consider interaction in the missing data model. Currenly only one intercation between response and covariates is supported. FALSE by default. |
k |
Which covariate has interaction with response. Takes integer values. User must assign a value if interaction = TRUE. |
na.action |
as in |
n |
number of observations. |
nmissing |
the number of missing observations. |
missing.proportion |
proportion of missing observations. |
beta.hat |
parameter estimate of logsitic regression of y on x using IL method. |
beta.se.hat |
standard error using IL method. |
z.value |
Wald Z value using IL method. |
p.value |
p value using IL method. |
significance.beta |
is indicator output whether regressors are significant using IL method, 1 if significant and 0 if not significant. |
LCL |
Lower Confidence Limits of 100(1 - alpha)% Confidence Intervals. |
UCL |
Upper Confidence Limits of 100(1 - alpha)% Confidence Intervals. |
alpha.hat |
parameter estimate due to missing model using IL. |
alpha.se.hat |
standard error of the them. |
z.value.alpha |
Wald Z value for them. |
p.value.alpha |
p values for them. |
sep |
separation indicator = 1 if separation, = 0 otherwise |
Ibrahim, J. G. and Lipsitz, S. R. (1996). Parameter estimation from incomplete data in binomial regression when the missing data mechanism is nonignorable. Biometrics, 52:1071–1078.
## Not run: ############################################# ########### Simulated Example ############### ############################################# data(simulated.data) # load simulated data # parameter definition beta0 <- 1 beta1 <- 1 beta2 <- 1 beta3 <- 1 beta4 <- 1 # parameter definition for missing indicator alpha0 <- -1.1 alpha1 <- -1 alpha2 <- 1 alpha3 <- 1 alpha4 <- 1 alpha5 <- -1 parameter <- c(beta0, beta1, beta2, beta3, beta4, alpha0, alpha1, alpha2, alpha3, alpha4, alpha5) il(y ~ x1 + x2 + x3 + x4, data = simulated.data, parameter, family = binomial(link = "logit"), na.action = na.pass) ## End(Not run) ## Not run: ############################################# ##### Real data example with separation ##### ############################################# data(nhanes) # load nhanes data il(hyp ~ age2 + age3, data = nhanes, family = binomial(link = "logit"), na.action = na.pass) # IL method encounters separation ## End(Not run)
## Not run: ############################################# ########### Simulated Example ############### ############################################# data(simulated.data) # load simulated data # parameter definition beta0 <- 1 beta1 <- 1 beta2 <- 1 beta3 <- 1 beta4 <- 1 # parameter definition for missing indicator alpha0 <- -1.1 alpha1 <- -1 alpha2 <- 1 alpha3 <- 1 alpha4 <- 1 alpha5 <- -1 parameter <- c(beta0, beta1, beta2, beta3, beta4, alpha0, alpha1, alpha2, alpha3, alpha4, alpha5) il(y ~ x1 + x2 + x3 + x4, data = simulated.data, parameter, family = binomial(link = "logit"), na.action = na.pass) ## End(Not run) ## Not run: ############################################# ##### Real data example with separation ##### ############################################# data(nhanes) # load nhanes data il(hyp ~ age2 + age3, data = nhanes, family = binomial(link = "logit"), na.action = na.pass) # IL method encounters separation ## End(Not run)
A urinary incontinence study.
incontinence
incontinence
A data frame with 21 observations on the following 4 variables:
Response (1 = continent, 0 = otherwise)
Lower urinary tract measure
Lower urinary tract measure
Lower urinary tract measure
Heinze, G. (2006). A comparative investigation of methods for logistic regression with seperated or nearly separated data. Statistics in Medicine, 25:4216–4226.
mice
package.A small data set with missing values.
nhanes
nhanes
A data frame with 25 observations on the following 2 variables:
Hypertensive (0 = no, 1 = yes)
Age group (1 = 40-59, 0 = otherwise)
Age group (1 = 60+, 0 = otherwise)
Schafer, J.L. (1997). Analysis of Incomplete Multivariate Data. London: Chapman & Hall. Table 6.14.
A dataset containing the 100 observations and 4 covariates. The covariates are generated from standard normal distribution. The missing binary response is generated using the simulation process as described in the reference.
simulated.data
simulated.data
A data frame with 100 observations with 28 missing responses: