Description Usage Arguments Author(s) References Examples
View source: R/bootstrapTimeVary.R
A concise (1-5 lines) description of what the function does.
| 1 | bootstrapTimeVary(x, n = 1000)
 | 
| x | |
| n | 
Thomas Maltesen
put references to the literature/web site here
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ## Not run: 
N<-2000
set.seed(3)
A0<-rnorm(N)
L0<-2*A0+rnorm(N)
A1<-3*L0+2.4*A0+rnorm(N)
Y<-2*A0+2*L0+3*A1+rnorm(N)
DAG.2<-data.frame(Y,A0,A1,L0)
rm("Y", "A0", "A1", "L0")
set.seed(3)
A0<-rnorm(N)
L0<-2*A0+rnorm(N)
A1<-3*L0+2.4*A0+rnorm(N)
L1<-2*A1+L0+rnorm(N)
A2<-1*L1+2.2*A1+rnorm(N)
Y<-2*A0+2*L0+3*A1+1*L1+2*A2+rnorm(N)
DAG.3<-data.frame(Y,A0,A1,A2,L0,L1)
rm("Y", "A0", "A1", "A2", "L0", "L1")
TimeVaryGcomp(model=Y ~ A0 + A1,
              cond=c(L0 ~ A0,
                     Y ~ A0 + A1 + L0),
              data=DAG.2)
Call: TimeVaryGcomp(model = Y ~ A0 + A1, 
                    cond = c(L0 ~ A0, 
                             Y ~ A0 + A1 + L0), 
                    data = DAG.2)
Coefficients:
            A0     A1
Estimat 5.7444 3.0342
TimeVaryGcomp(model=Y ~ A0 + A1 + A2,
              cond=c(L0 ~ A0,
                     L1 ~ L0 + A1 + A0,
                     Y ~ A0 + A1 + A2 + L0 + L1),
              data=DAG.3)
Call: TimeVaryGcomp(model = Y ~ A0 + A1 + A2, 
                    cond = c(L0 ~ A0, 
                             L1 ~ L0 + A1 + A0, 
                             Y ~ A0 + A1 + A2 + L0 + L1), 
                    data = DAG.3)
Coefficients:
            A0     A1    A2
Estimat 7.8372 4.9951 2.005
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.