library(dplyr) devtools::load_all() load("../simulation/simu_qte_v3.Rdata")
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
We conducted simulation studies to verify the validity of the proposed IPW and AIPW estimators.
Simulation set up
n = 400
Event indicator: $\delta = T < C$
Missing data: y_obs
in simulated data
y_actual
in simulated data y_actual
= $\min(y) - 1$ if $T < L$ head(db) %>% select(a, x, y, y_obs, y_actual, event_time, censor_time, obs_time, status, analysis_time) %>% knitr::kable(digits = 3)
The true value is estimated by y_actual
without using propensity score and censoring adjustment.
The sample size to calculate true value is 10,000 with replication of 1,000 times.
truth_est
The calculation is within each treatment group
glm(a ~ x, family = "binomial", data = db)
coxph(Surv(obs_time, 1 - status) ~ x, data = db)
and calculate the probability at the minimal of obs_time
and analysis_time
lm(y_obs ~ x, data = db)
f_q
y_std <- (q - db$y_mean) / db$y_sigma rho + (1 - rho) * pnorm(y_std)
(obs_time > analysis_time) | (obs_time <= analysis_time & status = TRUE)
a
: treatment groupxi
the quantile of interest n
: sample size in each group for true value estimationpct_missing
: Percent of subject with missing value at analysis time $L$pct_missing_death
: Percent of subject dead on or before analysis time $L$pct_missing_censor
: Percent of subject censored on or before analysis time $L$truth_summary %>% select(-q, -diff) %>% knitr::kable(digits = 1)
xi
the quantile of interest use_propensity
: whether to use propensity score is the estimator equation.use_km
: whether to use KM estimator to adjust censoring km_rho
: method to estimate the probability of death at $L$rho
: raw estimator (observed death before $L$) / number of subjectsrho_km
: estimated from Cox model coxph(Surv(obs_time, 1 - status) ~ x, data = db)
at time $L$.rho_km_simple
: estimated from KM estimator at time $L$.type
: using IPW
(formula 5) or AIPW
(formula 6).x0
, x0_true
: estimated or true value for the percentile in control groupx1
, x1_true
: estimated or true value for the percentile in treatment groupdiff
, diff_true
: estimated or true value for the percentile difference between two groupres_summary %>% ungroup() %>% subset(censoring) %>% mutate_if(is.numeric, round, 3) %>% show_db()
res_summary %>% ungroup() %>% subset( (!censoring) & n == 400) %>% mutate_if(is.numeric, round, 3) %>% show_db()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.