Description Usage Arguments Value Examples
Diff_test for testing causal effect among time-varying Exposure.
1 2 3 4 5 6 7 8 |
data |
an optional data frame containing the variables in the model. |
x1_name |
the name of pre-outcome exposure |
x3_name |
the name of post-outcome exposure |
x2_name |
the name of exposure between pre-outcome exposure and post-outcome exposure |
boots_no |
the number of bootstrap |
diff_test the result of Diff and its 95
1 2 3 4 5 6 7 8 9 | a <- rnorm(1000,0,1)
b <- a+rnorm(1000,0,1)
c <- b+rnorm(1000,0,1)
hhh <- data.frame(a,b,c)
hhh$x1 <- ifelse(a<(-0.5),0,ifelse(a>0.5,2,1))
hhh$x2 <- ifelse(b<(-0.5),0,ifelse(b>0.5,2,1))
hhh$x3 <- ifelse(c<(-0.5),0,ifelse(c>0.5,2,1))
con_result <- diff_test (data = hhh, expo_name1 = 'x1', expo_name2 = 'x2',
expo_name3 = 'x3', continuous = F, boot_no =1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.