library(dplyr)
load("../simulation/simu_qte.Rdata")
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Simulation Setup

We conducted simulation studies to verify the validity of the proposed IPW and AIPW estimators.

Simulation set up

Example of simulated data

head(db) %>% select(a, x, y, y_obs, event_time, censor_time, obs_time, status, analysis_time) %>% 
             knitr::kable(digits = 3)

Model Estimation

The calculation is within each treatment group

  1. Propensity score: Fit a logistic model: glm(a ~ x, family = "binomial", data = db)
  2. IPW weight $\pi$: KM estimator for censoring time: survfit(Surv(obs_time, 1 - status) ~ 1, data = db) and calculate the probability at the minimal of obs_time and analysis_time
  3. $F(y\mid x; \theta)$
  4. Fit a linear model based on observed outcome lm(y_obs ~ x, data = db)
  5. Calculate the scaled CDF for f_q
db$y_mean  <- predict(fit_lm_obs, newdata = db)
db$y_sigma <- summary(fit_lm_obs)$sigma
y_std <- (q -  db$y_mean)/ db$y_sigma
f_q <- pmax(db$rho, pnorm(y_std))
  1. $R$: (obs_time > analysis_time) | (obs_time <= analysis_time & status = TRUE)

Simulation Results

t1 %>% select(- naive) %>% knitr::kable(digits = 3)


elong0527/qte documentation built on Jan. 19, 2021, 10:24 p.m.