Description Usage Arguments Value References Examples
This function estimates the Mean-optimal Treatment Regime with censored response. The implemented function only works for scenarios in which treatment is binary and the censoring time is independent of baseline covariates, treatment group and all potential survival times.
1 2 3 | IPWE_mean_IndCen(data, regimeClass, moPropen = "BinaryRandom",
Domains = NULL, cluster = FALSE, p_level = 1, s.tol = 1e-04,
it.num = 8, pop.size = 3000)
|
data |
a data.frame, containing variables in the |
regimeClass |
a formula specifying the class of treatment regimes to search,
e.g. if d(x)=I(β_0 +β_1 * x1 + β_2 * x2 > 0). Polynomial arguments are also supported. |
moPropen |
The propensity score model for the probability of receiving
treatment level 1.
When |
Domains |
default is NULL. Otherwise, the object should be a |
cluster |
default is FALSE, meaning do not use parallel computing for the genetic algorithm(GA). |
p_level |
choose between 0,1,2,3 to indicate different levels of output from the genetic function. Specifically, 0 (minimal printing), 1 (normal), 2 (detailed), and 3 (debug). |
s.tol |
tolerance level for the GA algorithm. This is input for parameter |
it.num |
the maximum GA iteration number |
pop.size |
an integer with the default set to be 3000. This is roughly the
number individuals for the first generation
in the genetic algorithm ( |
This function returns an object with 6 objects:
coefficients
the estimated parameter indexing the mean-optimal treatment regime.
Since we focus the space of linear treatment regimes, the estimated decision rule
cannot be uniquely identified without scale normalized. In this package,
we normalized by |β_1| = 1, which was proposed in Horowitz \insertCitehorowitz1992smoothedQTOCen.
hatQ
the estimated optimal marginal mean response
moPropen
log of the input argument of moPropen
regimeClass
log of the input argument of regimeClass
data_aug
Training data with additional columns used in the algorithm. Note that data_aug
is used for plotting
of survival function of the censoring time
survfitCensorTime
the estimated survival function of the censoring time
zhou2018quantileQTOCen
\insertRefhorowitz1992smoothedQTOCen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | GenerateData <- function(n)
{
x1 <- runif(n, min=-0.5,max=0.5)
x2 <- runif(n, min=-0.5,max=0.5)
error <- rnorm(n, sd= 1)
ph <- exp(-0.5+1*(x1+x2))/(1+exp(-0.5 + 1*(x1+x2)))
a <- rbinom(n = n, size = 1, prob=ph)
c <- 1.5 + + runif(n = n, min=0, max=2)
cmplt_y <- pmin(2+x1+x2 + a*(1 - x1 - x2) + (0.2 + a*(1+x1+x2)) * error, 4.4)
censor_y <- pmin(cmplt_y, c)
delta <- as.numeric(c > cmplt_y)
return(data.frame(x1=x1,x2=x2,a=a, censor_y = censor_y, delta=delta))
}
n <- 400
D <- GenerateData(n)
fit1 <- IPWE_mean_IndCen(data = D, regimeClass = a~x1+x2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.