Learn R Programming

DynTxRegime (version 3.01)

.newIQLearnSS: First Step of IQ-Learning Algorithm

Description

Second Stage Regression Step of IQ-Learning Algorithm. Method is not exported.

Usage

.newIQLearnSS(moMain, moCont, ...)

# S4 method for modelObj,modelObj .newIQLearnSS(moMain, moCont, data, response, txName, iter, suppress) # S4 method for modelObj,NULL .newIQLearnSS(moMain, moCont, data, response, txName, iter, suppress) # S4 method for NULL,modelObj .newIQLearnSS(moMain, moCont, data, response, txName, iter, suppress)

Arguments

moMain
"modelObj" for main effects component of outcome.
moCont
"modelObj" for contrasts component of outcome.
...
Used to pass arguments that are required but the class of which does not determine the method that is selected.
data
"data.frame" of covariates and treatment history.
response
Outcome of interest.
txName
"character" name of treatment variable in data.
iter
Maximum number of iterations if iterative algorithm used.
suppress
T/F indicating if screen prints are generated.

Examples

Run this code
data(bmiData)

bmiData$A2 <- as.factor(bmiData$A2)

moMain <- buildModelObj(model = ~month4BMI + baselineBMI, 
                        solver.method = 'lm')
moCont <- buildModelObj(model = ~month4BMI + baselineBMI, 
                        solver.method = 'lm')

y <- -(bmiData$month12BMI - bmiData$month4BMI) / bmiData$month4BMI * 100

obj1 <- DynTxRegime:::.newIQLearnSS(moMain = moMain, 
                                    moCont = moCont, 
                                    response = y,
                                    data = bmiData, 
                                    txName = 'A2', 
                                    iter = 0L, 
                                    suppress = TRUE)

is(obj1)

coef(obj1)
DTRstep(obj1)
fitObject(obj1)
fittedCont(obj1)
fittedMain(obj1)
optTx(obj1)
optTx(obj1,bmiData)
outcome(obj1)
plot(obj1)
propen(obj1)
show(obj1)
summary(obj1)

Run the code above in your browser using DataLab