DatawMis | R Documentation |
The data by the name "DataSetFull" contain the data with full data. The data by the name "DataSetMonotone" contain the data with missing observation following a monotone pattern. The missigness follow coarsening at random. The data by the name "DataSetnonMonotone" contain the data with missing observation following a nonmonotone pattern.
L0 |
Baseline measurement. |
A0 |
The exposure after baseline measurement. |
L1 |
Confounder for the two exposure A1 and A2. |
A1 |
The exposure at time 1. |
L2 |
Confounder for the exposure A2. |
A2 |
The exposure at time 2. |
Y |
The outcome. |
Thomas Maltesen thomas.maltesen@protonmail.com
put references to the literature/web site here
## Not run:
p<-function(x)exp(x)/(1+exp(x))
L0<-rnorm(10000)
A0<-1*(runif(10000,0,1)<=p(0.6*L0))
L1<--A0+0.2*L0-1*A0*L0+rnorm(10000)
A1<-1*(runif(10000,0,1)<=p(-1+1.6*A0+1.2*L1-0.8*L0-1.6*L1*A0))
L2<--A1+1*L1-A0+1.2*L0+rnorm(10000)
A2<-1*(runif(10000,0,1)<=p(1-0.8*L0+1.6*A0+1.2*L1+1.3*A1+0.5*L2+1.6*L1*A1))
Y<-2*L0+3*A0+1*L1+2*A1-2*L2+5*A2+L2*A2+rnorm(10000)
DataSet<-data.frame(L0, L1, L2, A0, A1, A2, Y)
rm(list=c("L0","A0","L1","A1","L2","A2","Y"))
model1 <- Y ~ L0 + A0 + L1 + A1 + L2 + A2 + L2*A2
model2 <- model1 ~ A1 + L1 + A0 + L0
model3 <- model2 ~ A0 + L0 + A0*L0
g.aipw.dicho(mmodels=c(model1,model2,model3),
exposure=c("A0","A1","A2"),
data=DataSet)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.