Estimate an optimal dynamic treatment regime using the Interactive Q-learning (IQ-learning) algorithm when the data has been collected from a two-stage randomized trial with binary treatments. iqLearnSS implements the second-stage regression step of the IQ-Learning algorithm (IQ1).
iqLearnSS(..., moMain, moCont, data, response, txName, iter = 0L, verbose = TRUE)
ignored. Included to require named input.
An object of class "modelObj."
This object specifies the main effects component
of the model for the outcome regression
and the R methods to be used to obtain parameter
estimates and predictions.
The method specified to obtain predictions must return
the prediction on the scale of the response variable.
An object of class "modelObj."
This object specifies the contrasts component
of the model for the outcome regression
and the R methods to be used to obtain parameter
estimates and predictions.
The method specified to obtain predictions must return
the prediction on the scale of the response variable.
An object of class "data.frame."
The covariates and treatment histories.
An object of class "vector."
The outcome of interest.
An object of class "character."
The column header of the stage treatment variable
as given in input data
. The treatment variable must
be binary and will be recoded as -1/+1 if not provided
as such.
An object of class "integer."
If >0, the iterative method will be used to
obtain parameter estimates in the outcome regression step.
See iter for further information.
An object of class "logical."
If FALSE, screen prints will be suppressed.
Returns an object of class "IQLearnSS"
that inherits directly from class "DynTxRegime."
signature(object = "IQLearnSS")
:
Retrieve parameter estimates for all regression steps.
signature(object = "IQLearnSS")
:
Retrieve description of method used to create object.
signature(x = "IQLearnSS")
:
Retrieve the estimated value of the estimated
optimal regime for the training data set.
signature(object = "IQLearnSS")
:
Retrieve value object returned by regression methods.
signature(object = "IQLearnSS")
:
Retrieve estimated contrast component of outcome regression.
signature(object = "IQLearnSS")
:
Retrieve estimated main effects component of outcome regression.
signature(x = "IQLearnSS", newdata = "missing")
:
Retrieve the estimated optimal treatment regime for
training data set.
signature(x = "IQLearnSS", newdata = "data.frame")
:
Estimate the optimal treatment regime for newdata.
signature(x = "IQLearnSS")
:
Retrieve value object returned by outcome regression methods.
signature(x = "IQLearnSS")
:
Generate plots for regression analyses.
signature(object = "IQLearnSS")
:
Print main results of analysis.
signature(object = "IQLearnSS")
:
Show main results of analysis.
signature(object = "IQLearnSS")
:
Retrieve summary information from regression analyses.
Laber, E. B., Linn, K. A., and Stefanski, L.A. (2014). Interactive model building for Q-learning. Biometrika, 101, 831--847.
# NOT RUN {
# Load and process data set
data(bmiData)
# define response y to be the negative 12 month
# change in BMI from baseline
bmiData$y <- -100*(bmiData[,6] - bmiData[,4])/bmiData[,4]
# Second-stage regression - Single Regression Analysis
# Create modelObj object for main effect component
moMain <- buildModelObj(model = ~ gender + parentBMI + month4BMI,
solver.method = 'lm')
# Create modelObj object for contrast component
moCont <- buildModelObj(model = ~ parentBMI + month4BMI,
solver.method = 'lm')
iqSS <- iqLearnSS(moMain = moMain, moCont = moCont,
data = bmiData, response = bmiData$y, txName = "A2",
iter = 0L)
## Available methods for second stage step
# Coefficients of the outcome regression
coef(iqSS)
# Description of method used to obtain object
DTRstep(iqSS)
# Value object returned by outcome regression method
fitObject(iqSS)
# Contrast component of outcome regression
fittedCont(iqSS)
# Main effects component of outcome regression
fittedMain(iqSS)
# Value object returned by outcome regression method
outcome(iqSS)
# Plots if defined by outcome regression method
dev.new()
par(mfrow = c(2,4))
plot(iqSS)
plot(iqSS, suppress = TRUE)
# Show main results of method
show(iqSS)
# Show summary results of method
summary(iqSS)
# }
Run the code above in your browser using DataLab