MR.quantile: Multiply Robust Estimation of the Marginal Quantile

Description Usage Arguments Value References Examples

Description

MR.quantile() is used to estimate the marginal quantile of a variable which is subject to missingness. Multiple missingness probability models and imputation models are allowed.

Usage

1
2
3
MR.quantile(response, 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

response

The response variable of interest whose marginal quantile is to be estimated.

tau

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

imp.model

A list of imputation models defined by glm.work.

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.

Value

q

The estimated value of the marginal quantile.

SE

The bootstrap standard error of q when bootstrap = TRUE.

CI

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

weights

The calibration weights if any imp.model, mis.model or moment is specified.

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Simulated data set
set.seed(123)
n <- 400
gamma0 <- c(1, 2, 3)
alpha0 <- c(-0.8, -0.5, 0.3)
X <- runif(n, min = -2.5, max = 2.5)
p.mis <- 1 / (1 + exp(alpha0[1] + alpha0[2] * X + alpha0[3] * X ^ 2))
R <- rbinom(n, size = 1, prob = 1 - p.mis)
a.x <- gamma0[1] + gamma0[2] * X + gamma0[3] * exp(X)
Y <- rnorm(n, a.x, sd = sqrt(4 * X ^ 2 + 2))
dat <- data.frame(X, Y)
dat[R == 0, 2] <- NA

# Define the outcome regression models and missingness probability models
imp1 <- glm.work(formula = Y ~ X + exp(X), family = gaussian)
imp2 <- glm.work(formula = Y ~ X + I(X ^ 2), family = gaussian)
mis1 <- glm.work(formula = R ~ X + I(X ^ 2), family = binomial(link = logit))
mis2 <- glm.work(formula = R ~ X + exp(X), family = binomial(link = cloglog))
MR.quantile(response = Y, tau = 0.25, imp.model = list(imp1, imp2),
            mis.model = list(mis1, mis2), L = 10, data = dat)
MR.quantile(response = Y, tau = 0.25, moment = c(X), order = 2, data = dat)

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