IPWE_Qopt_DepCen_general: Estimate Quantile-optimal Treatment Regime for...

Description Usage Arguments Examples

Description

This function estimates the Quantile-optimal Treatment Regime for a given quantile level of interest under the assumption that the distribution of censoring time is independent of the set of potential survival times given a set of baseline covariates and treatment actually received.

More specifically, we do stratification by treatment first and then used kernel smoothing to estimate local survival function of censoring time for each treatment group.

Usage

1
2
3
4
IPWE_Qopt_DepCen_general(data, regimeClass, tau, Domains = NULL, bw,
  moPropen = "BinaryRandom", DepCens = NULL, UseTrueG = FALSE,
  trueG_value = NULL, cluster = FALSE, p_level = 1, s.tol = 1e-05,
  it.num = 8, pop.size = 5000)

Arguments

data

raw data.frame

regimeClass

the class of treatment regimes. e.g., 'txname ~ x1+x2'.

tau

the quantile of interest

Domains

default is NULL.

bw

the bandwidth of local KM model (e.g. see Wang-wang 2008)

moPropen

an optional string for the working model of treatment assignment

DepCens

an optional vector of baseline variable names that the censoring variable depends on. Note that the treatment variable is always treated as dependent with the censoring time. If unspecified (DepCens=NULL), then all variables on the right side of regimeClass are used for DepCens

UseTrueG

logical. Whether the true survival probability of each patient is provided.

trueG_value

default is NULL. IF UseTrueG=FALSE, trueG_value should be NULL.

cluster

default is FALSE. This can also be an object of the 'cluster' class returned by one of the makeCluster commands in the parallel package or a vector of machine names so rgenoud::genoud can setup the cluster automatically.

p_level

print level

s.tol

tolerance level

it.num

the maximum iteration number

pop.size

the initial population size

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
data <- GenerateData(n)
fit1 <- IPWE_Qopt_DepCen_general(data = data, regimeClass = a~x1+x2, moPropen = a~x1+x2,
                                 tau = 0.2, bw = 20/n, 
                                 pop.size=3000, it.num = 3)
                                 

QTOCen documentation built on June 4, 2019, 5:03 p.m.