Genetic.optim.DRKMEIV {otrKM}R Documentation

The optimal treatment regime based on the (S)DRKMEIV estimator.

Description

Given a predetermined t0, estimate the optimal treatment regime by maximizing t0-year survival probability based on the (S)DRKMEIV estimator.

Usage

Genetic.optim.DRKMEIV(datalist, ps, prep, t0, smooth = TRUE)

Arguments

datalist

A list used to calculate the (S)DRKMEIV estimator including instrument named z, treatment named a, observed time named obs.t, censoring indicator (0, censored) named delta, and baseline covariates used to assign treatment named l. Notice that all the data in the datalist should be ordered by observed time.

ps

A list including the probability of receiving instrument given baseline covariates named fzl, the probability of receiving treatment given baseline covariates and instrument equaling 0 named fal0, the probability of receiving treatment given baseline covariates and instrument equaling 1 named fal1, and the difference between fal1 and fal0 named deltal. Fps.DRKMEIV can produce ps by positing logistic model.

prep

A list including estimates \hat{\gamma}_1(\boldsymbol{L};s) with treatment all to 1 named gamma.num.1 and all to 0 named gamma.num.0, \hat{\gamma}_1'(\boldsymbol{L};s) with treatment all to 1 named gammaa.num.1 and all to 0 named gammaa.num.0, \hat{\gamma}_2(\boldsymbol{L};s) with treatment all to 1 named gamma.den.1 and all to 0 named gamma.den.0, and \hat{\gamma}_2'(\boldsymbol{L};s) with treatment all to 1 named gammaa.den.1 and all to 0 named gammaa.den.0; gamma.num.1 and the others are matrix with ordered observed time as rows and patients as columns. There are also estimates for the last term of the (S)DRKMEIV estimator. More details can be found in references. Fprep.DRKMEIV can produce prep by positing Cox proportional hazards model.

t0

A predetermined time to point out that t0-year survival probability is our estimate

smooth

A logic variable indicating wether a smoothed version should be used.

Details

More details can be found in references.

Value

A numeric vector in which the last number is the estimated optimal t0-year survival probability and the others are the estimated parameter of the optimal treatment regime.

References

Xia, J., Zhan, Z., Zhang, J. (2022) Estimating optimal treatment regime in survival contexts using an instrumental variable. Under Review.

Examples

# load data
data(simulation)

# order the data by observed time and select the first 200 patients to speed up 
simulation=simulation[order(simulation$Survival)[1:200],]

# convert the data into a datalist
datalist=list(z=simulation$Instrument,a=simulation$Treatment,
              obs.t=simulation$Survival,delta=simulation$Status,
              l=cbind(simulation$Covariate1,simulation$Covariate2))

# predetermined t0
t0=1

# calculate ps and prep
ps=Fps.DRKMEIV(datalist, t0)
prep=Fprep.DRKMEIV(datalist, ps, t0)


Genetic.optim.DRKMEIV(datalist, ps, prep, t0, smooth=TRUE)

[Package otrKM version 0.2.1 Index]