Description Usage Arguments Details Value Examples

Functions to perform CIEE under the GLM or AFT setting:
`ciee`

obtains point and standard error estimates of all parameter estimates,
and p-values for testing the absence of effects; `ciee_loop`

performs
`ciee`

in separate analyses of multiple exposure variables with the same
outcome measures and factors ond only returns point estimates, standard error
estimates and p-values for the exposure variables. Both functions can also compute
estimates and p-values from the two traditional regression methods and from the
structural equation modeling method.

1 2 3 4 5 6 7 | ```
ciee(setting = "GLM", estimates = c("ee", "mult_reg", "res_reg", "sem"),
ee_se = c("sandwich"), BS_rep = NULL, Y = NULL, X = NULL, K = NULL,
L = NULL, C = NULL)
ciee_loop(setting = "GLM", estimates = c("ee", "mult_reg", "res_reg",
"sem"), ee_se = c("sandwich"), BS_rep = NULL, Y = NULL, X = NULL,
K = NULL, L = NULL, C = NULL)
``` |

`setting` |
String with value |

`estimates` |
String vector with possible values |

`ee_se` |
String with possible values |

`BS_rep` |
Integer indicating the number of bootstrap samples that are drawn (recommended 1000) if bootstrap standard errors are computed. |

`Y` |
Numeric input vector for the primary outcome. |

`X` |
Numeric input vector for the exposure variable if the |

`K` |
Numeric input vector for the intermediate outcome. |

`L` |
Numeric input vector for the observed confounding factor. |

`C` |
Numeric input vector for the censoring indicator under the AFT setting (must be coded 0 = censored, 1 = uncensored). |

For the computation of CIEE, point estimates of the parameters are obtained
using the `get_estimates`

function. Robust sandwich (recommended),
bootstrap, or naive standard error estimates of the parameter estimates are
obtained using the `sandwich_se`

, `bootstrap_se`

or `naive_se`

function. Large-sample Wald-type tests are performed
for testing the absence of effects, using either the robust sandwich or
bootstrap standard errors.

Regarding the traditional regression methods, the multiple regression or
regression of residual approaches can be computed using the
`mult_reg`

and `res_reg`

functions. Finally, the
structural equation modeling approachcan be performed using the
`sem_appl`

function.

Object of class `ciee`

, for which the summary function
`summary.ciee`

is implemented.
`ciee`

returns a list containing the point and standard error
estimates of all parameters as well as p-values from hypothesis tests
of the absence of effects, for each specified approach.
`ciee_loop`

returns a list containing the point and standard
error estimates only of the exposure variables as well as p-values from
hypothesis tests of the absence of effects, for each specified approach.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
# Generate data under the GLM setting with default values
maf <- 0.2
n <- 100
dat <- generate_data(n = n, maf = maf)
datX <- data.frame(X = dat$X)
names(datX)[1] <- "X1"
# Add 9 more exposure variables names X2, ..., X10 to X
for (i in 2:10){
X <- stats::rbinom(n, size = 2, prob = maf)
datX$X <- X
names(datX)[i] <- paste("X", i, sep="")
}
# Perform analysis of one exposure variable using all four methods
ciee(Y = dat$Y, X = datX$X1, K = dat$K, L = dat$L)
# Perform analysis of all exposure variables only for CIEE
ciee_loop(estimates = "ee", Y = dat$Y, X = datX, K = dat$K, L = dat$L)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.