g.dicho | R Documentation |
g.dicho(mmodels, exposure, data, ...)
mmodels |
The models correspond to the models the outcome. |
exposure |
The time-varying exposure. |
data |
Data. |
coef |
The coefficients in marginal strucktural model. |
ExpectEstimate |
The expected value of the potential outcome. |
mmodels |
The mmodels that have been used for modeling data. |
exposure |
The exposure of the analysis. |
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 |
... |
Thomas Maltesen thomas.maltesen@protonmail.com
put references to the literature/web site here
## 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<-lapply(1:loop,function(iiii) g.dicho(mmodels=c(model1,model2,model3),
exposure=c("A0","A1","A2"),
data=DataSetFull[[iiii]])$coef)
round(listMean(estimationSG),3)
(Intercept) A0 A1 A2 A0*A1 A0*A2 A1*A2 A0*A1*A2
Est. -0.007 6.009 3.996 5.002 0 -2.004 -1.005 0
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
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.