Description Usage Arguments Value Author(s) See Also Examples
Loop through each combination of dependent and independent variables, running a generalized estimating equations model on each combination, and generate a dataframe of the results.
1 2 3 4 |
data |
Dataset to run GEE on |
dependent |
The dependent (aka outcome or response) variables. Must be quoted and can have several. |
independent |
Like |
id |
The variable to cluster on for GEE, for instance the 'ID' variable for a person in a longitudinal cohort. |
covariates |
The covariate variables. Can be multiple covariates. |
interaction |
A single interaction variable. |
corstr |
a character string specifying the correlation structure. The following are permitted: '"independence"', '"exchangeable"', '"ar1"', '"unstructured"' and '"userdefined"' |
family |
See corresponding documentation to |
conf.int |
whether to include a confidence interval |
conf.level |
confidence level of the interval, used only if
|
na.rm |
Remove missing values from the dataset before running
GEE. |
filter.indep |
Logical; Keep only the rows that have the
|
filter.interact |
Logical; Keep only the rows that have the
|
adjust.p.value |
Logical; Adjust for multiple comparisons using the False Discovery Rate. |
A dataframe of all the GEE analyses, with estimates, confidence intervals, and p-values.
Luke W. Johnston
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(state)
ds <- data.frame(state.region, state.x77)
names(ds)
outcome <- c('Income', 'Murder')
exposure <- c('Population', 'Life.Exp', 'Illiteracy')
covar <- c('Area', 'Frost')
cid <- 'state.region'
loopGEE(ds, outcome, exposure, cid)
loopGEE(ds, outcome, exposure, cid, covariates = covar)
loopGEE(ds, outcome, exposure, cid, covariates = covar, interaction = 'HS.Grad')
loopGEE(ds, outcome, exposure, cid, covariates = covar, interaction = 'Area')
loopGEE(ds, outcome, exposure, cid, corstr = 'ar1', conf.level = 0.99)
loopGEE(ds, outcome, exposure, cid, corstr = 'ar1', conf.int = FALSE)
loopGEE(ds, outcome, exposure, cid, corstr = 'ar1', adjust.p.value = TRUE)
loopGEE(ds, outcome, exposure, cid, covariates = covar, adjust.p.value = TRUE)
loopGEE(ds, outcome, exposure, cid, covariates = covar, adjust.p.value = TRUE,
filter.indep = TRUE)
loopGEE(ds, outcome, exposure, cid, interaction = 'Area', covariates = covar,
adjust.p.value = TRUE, filter.interact = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.