g.dr.dicho: The estimator for the g-formula that utilizes data with...

View source: R/g.dr.dicho.R

g.dr.dichoR Documentation

The estimator for the g-formula that utilizes data with missing observations

Usage

g.dr.dicho(mmodels, exposure, covariates, pattern, regList, data, aug = NULL, ...)

Arguments

mmodels

Models corresponding to response.

exposure

The time-varying exposure.

covariates

The ordered sequence of the variables of the interest without the response.

regList

The list consist of the models to estimate the probabilities for the missingness in data. See the function missing.pattern.

augList

The list consist of the models of the Augmentations space. All the models are linear by default (augList=NULL)

data

Data.

...

Value

ExpectEstimate

The expected value of the potential outcome.

coef

The coefficients in marginal strucktural model.

mmodels

The mmodels that have been used for modeling data.

N

The sample size of data.

NCC

The sample size of complete cases of data. In case of no missing values NCC is equal to N.

exposure

The exposure of the analysis.

augList

The list consist of the models of the Augmentations space. All the models are linear by default (augList=NULL)

Author(s)

Thomas Maltesen thomas.maltesen@protonmail.com

References

put references to the literature/web site here

See Also

See also g.dicho.

Examples

## Not run: 
model1 <- Y ~ L0 + A0 + L1 + A1 + L2 + A2 + L2*A2
model2 <- L2 ~ A1 + L1 + A0 + L0
model3 <- L1 ~ A0 + L0 + A0*L0


estimationSG.NA<-lapply(1:loop,function(iiii) g.dicho(mmodels=c(model1,model2,model3),
                                                      exposure=c("A0","A1","A2"),
                                                      data=DataSetMonotone[[iiii]])$coef)
round(listMean(estimationSG.NA),3)
     (Intercept)    A0    A1    A2 A0*A1  A0*A2  A1*A2 A0*A1*A2
Est.      -0.249 6.443 3.555 5.743     0 -2.551 -0.782        0

estimationMis.SG<-lapply(1:loop,function(iiii) g.dr.dicho(mmodels=c(model1,model2,model3),
                                                          exposure=c("A0","A1","A2"),
                                                          data=DataSetMonotone[[iiii]],
                                                          covariates=c("L0","A0","L1","A1","L2","A2"),
                                                          regList=regList)$coef)
round(listMean(estimationMis.SG),3)
     (Intercept)    A0 A1    A2 A0*A1  A0*A2  A1*A2 A0*A1*A2
Est.      -0.016 6.015  4 5.015     0 -2.004 -1.004        0

## End(Not run)

mcl868/causalinmisdata documentation built on March 5, 2024, 8:22 a.m.