Learn R Programming

DynTxRegime (version 3.01)

.newIQLearnFS_VHet: Fourth Step of IQ-Learning Algorithm

Description

Regression of residuals. Method is not exported.

Usage

.newIQLearnFS_VHet(object, moMain, moCont, ...)

# S4 method for IQLearnFS_C,modelObj,modelObj .newIQLearnFS_VHet(object, moMain, moCont, data, iter, suppress) # S4 method for IQLearnFS_C,modelObj,NULL .newIQLearnFS_VHet(object, moMain, moCont, data, iter, suppress) # S4 method for IQLearnFS_C,NULL,modelObj .newIQLearnFS_VHet(object, moMain, moCont, data, iter, suppress)

Arguments

object
An object of class "IQLearnFS_C-class."
moMain
"modelObj" for main effects component of variance.
moCont
"modelObj" for contrasts component of variance.
...
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.
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)

obj3 <- DynTxRegime:::.newIQLearnFS_VHet(object = obj2, 
                                         moMain = moMain, 
                                         moCont = moCont,
                                         data = bmiData, 
                                         iter = 0L, 
                                         suppress = TRUE)

is(obj3)

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

Run the code above in your browser using DataLab