MR.quantreg: Multiply Robust Estimation for Quantile Regression

Description Usage Arguments Details Value References See Also Examples

Description

MR.quantreg() is used for quantile regression with missing responses and/or missing covariates. Multiple missingness probability models and imputation models are allowed.

Usage

1
2
3
MR.quantreg(formula, tau = 0.5, imp.model = NULL, mis.model = NULL,
  moment = NULL, order = 1, L = 30, data, bootstrap = FALSE,
  bootstrap.size = 300, alpha = 0.05, ...)

Arguments

formula

The formula of the linear quantile regression model of interest.

tau

A numeric value in (0,1). The quantile to be estimated.

imp.model

A list of possibly multiple lists of the form list(list.1, list.2, ..., list.K), where K is the total number of different imputation models. For the k-th imputation model, list.k is a list of possibly multiple models, each of which is defined by glm.work and imputes one single missing variable marginally. See details.

mis.model

A list of missingness probability models defined by glm.work. The dependent variable is always specified as R.

moment

A vector of auxiliary variables whose moments are to be calibrated.

order

A numeric value. The order of moments up to which to be calibrated.

L

Number of imputations.

data

A data frame with missing data encoded as NA.

bootstrap

Logical. If bootstrap = TRUE, the bootstrap will be applied to calculate the standard error and construct a Wald confidence interval.

bootstrap.size

A numeric value. Number of bootstrap resamples generated if bootstrap = TRUE.

alpha

Significance level used to construct the 100(1 - alpha)% Wald confidence interval.

...

Addition arguments for the function rq.

Details

The function MR.quantreg() currently deals with data with one missingness pattern. When multiple variables are subject to missingness, their values are missing simultaneously. The method in Han et al. (2019) specifies an imputation model by modeling the joint distribution of the missing variables conditional on the fully observed variables. In contrast, the function MR.quantreg() specifies an imputation model by separately modeling the marginal distribution of each missing variable conditional on the fully observed variables. These marginal distribution models for different missing variables constitute one joint imputation model. Different imputation models do not need to model the marginal distribution of each missing variable differently.

Value

coefficients

The estimated quantile regression coefficients.

SE

The bootstrap standard error of coefficients when bootstrap = TRUE.

CI

A Wald-type confidence interval based on coefficients and SE when bootstrap = TRUE.

References

Han, P., Kong, L., Zhao, J. and Zhou, X. (2019). A general framework for quantile estimation with incomplete data. Journal of the Royal Statistical Society: Series B (Statistical Methodology). 81(2), 305–333.

See Also

rq.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Simulated data set
set.seed(123)
n <- 400
gamma0 <- c(1, 2, 3)
alpha0 <- c(-0.8, -0.5, 0.3)
S <- runif(n, min = -2.5, max = 2.5) # auxiliary variables
X1 <- rbinom(n, size = 1, prob = 0.5) # covariate X1
X2 <- rexp(n) # covariate X2
p.obs <- 1 / (1 + exp(alpha0[1] + alpha0[2] * S + alpha0[3] * S ^ 2)) # non-missingness probability
R <- rbinom(n, size = 1, prob = p.obs)
a.x <- gamma0[1] + gamma0[2] * X1 + gamma0[3] * X2
Y <- rnorm(n, a.x)
dat <- data.frame(S, X1, X2, Y)
dat[R == 0, c(2, 4)] <- NA # X1 and Y may be missing

# marginal imputation models for X1
impX1.1 <- glm.work(formula = X1 ~ S, family = binomial(link = logit))
impX1.2 <- glm.work(formula = X1 ~ S + X2, family = binomial(link = cloglog))
# marginal imputation models for Y
impY.1 <- glm.work(formula = Y ~ S, family = gaussian)
impY.2 <- glm.work(formula = Y ~ S + X2, family = gaussian)
# missingness probability models
mis1 <- glm.work(formula = R ~ S + I(S ^ 2), family = binomial(link = logit))
mis2 <- glm.work(formula = R ~ I(S ^ 2), family = binomial(link = cloglog))
# this example considers the following K = 3 imputation models for imputing the missing (X1, Y)
imp1 <- list(impX1.1, impY.1)
imp2 <- list(impX1.1, impY.2)
imp3 <- list(impX1.2, impY.1)

results <- MR.quantreg(formula = Y ~ X1 + X2, tau = 0.75, imp.model = list(imp1, imp2, imp3),
                       mis.model = list(mis1, mis2), L = 10, data = dat)
results$coefficients
MR.quantreg(formula = Y ~ X1 + X2, tau = 0.75, 
            moment = c(S, X2), order = 2, data = dat)$coefficients

MultiRobust documentation built on June 4, 2019, 1:03 a.m.