Description Usage Arguments Value Examples
Eliminating the Unmeasured Confounders and Estimating Causal Effect for Categorical outcome.
1 2 3 4 5 6 7 |
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 |
y_name |
the name of outcome |
boots_no |
the number of bootstrap |
coefficient the casual effect coefficients
and its 95
1 2 3 4 5 6 7 8 9 10 11 12 | u1 <- rbinom(1000,1,0.5)
px1 <- exp(0.8*u1)/(1+exp(0.8*u1))
x1 <- apply(matrix(px1,nrow=1),2,rbinom,n=1,size=1)
px3 <- exp(0.8*u1)/(1+exp(0.8*u1))
x3 <- apply(matrix(px3,nrow=1),2,rbinom,n=1,size=1)
py<- 0.2*x1+0.4*u1
y<- apply(matrix(py,nrow=1),2,rbinom,n=1,size=1)
data <- data.frame(x1,x3,y)
model <- ncets_cat ( data = data,x1_name = 'x1',
x3_name = 'x3', y_name ='y',boots_no = 1000)
model
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.