Nothing
## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
dev = "ragg_png",
dpi = 192,
fig.width = 7,
fig.height = 4.5,
out.width = "90%",
fig.align = "center",
warning = FALSE,
message = FALSE
)
## -----------------------------------------------------------------------------
library(PDRobust)
data("BiSample", package = "PDRobust")
map <- Mapping(
id = "id",
time = "time",
treatment = "A",
survival = "S",
outcome = "Y",
baseline_time = 0,
cutoff_time = 2,
covariates = c("X1", "X2", "X3", "X4", "X5","X6"),
interest_vars = c("X1", "X2"),
y_type = "B"
)
pd_data <- DataStandard(BiSample, map)
## -----------------------------------------------------------------------------
head(pd_data)
## -----------------------------------------------------------------------------
ps_fo <- A ~ X1 + X3 + X4 + X5 + X6
prin_fo <- S ~ (X1 + X3 + X4 + X5 + X6 ) * A
out_fo <- Y ~ (X1 + X3 + X4 + X5 + X6) * A
## -----------------------------------------------------------------------------
ps <- PSPred(
ps_fo = ps_fo,
fit_dat = pd_data,
pred_dat = pd_data,
mapping = map
)
head(ps)
## -----------------------------------------------------------------------------
p1 <- PrinPred(
prin_fo = prin_fo,
fit_dat = pd_data,
pred_dat = pd_data,
a = 1,
mapping = map
)
head(p1)
## -----------------------------------------------------------------------------
mu0 <- OutPred(
out_fo = out_fo,
fit_dat = pd_data,
pred_dat = pd_data,
a = 0,
mapping = map
)
head(mu0)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.