IWKMEIV {otrKM}R Documentation

The (S)IWKMEIV estimator.

Description

Given a predetermined t0 and eta, calculate t0-year potential survival probability based on the (S)IWKMEIV estimator.

Usage

IWKMEIV(eta, datalist, ps, t0, smooth = TRUE)

Arguments

eta

The parameters of the regime.

datalist

A list used to calculate the (S)IWKMEIV estimator including 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 and the difference between fal1 and fal0 named deltal, where fal0 denotes the probability of receiving treatment given baseline covariates and instrument equaling 0, and fal1 denotes the probability of receiving treatment given baseline covariates and instrument equaling 1. Fps.IWKMEIV can produce ps by positing logistic model.

t0

A predetermined time.

smooth

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

Details

More details can be found in references.

Value

Estimated potential survival probability given eta and t0.

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)
simulation=simulation[order(simulation$Survival),]

# 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 and eta
t0=5
eta=c(1,2,3)

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

IWKMEIV(eta, datalist, ps, t0, smooth=TRUE)

[Package otrKM version 0.2.1 Index]