Learn R Programming

DynTxRegime (version 3.01)

.newIQLearnFS_C: Second Step of IQ-Learning Algorithm

Description

Regression of estimated contrasts of second stage outcome step of IQ-Learning algorithm. Method is not exported. Method is not exported.

Usage

.newIQLearnFS_C(moMain, moCont, response, ...)

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

Arguments

moMain
"modelObj" for main effects component of estimated contrasts.
moCont
"modelObj" for contrasts component of estimated contrasts.
response
An object of class "IQLearnSS-class."
...
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.
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)
bmiData$A1 <- as.factor(bmiData$A1)

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)


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

obj2 <- DynTxRegime:::.newIQLearnFS_C(moMain = moMain, 
                                      moCont = moCont,  
                                      response = obj1,
                                      data = bmiData,  
                                      txName = 'A1',  
                                      iter = 0L,  
                                      suppress = TRUE)

is(obj2)

coef(obj2)
DTRstep(obj2)
fitObject(obj2)
outcome(obj2)
plot(obj2)
propen(obj2)
show(obj2)
summary(obj2)

Run the code above in your browser using DataLab