Variable selection in Generalized Estimating Equations
Performs variable selection in generalized estimating equations using a chosen model fit criterion.
## S3 method for class 'glmgee' stepCriterion( model, criterion = c("p-value", "qic", "qicu", "adjr2"), direction = c("backward", "forward"), test = c("wald", "score"), level = 0.05, verbose = TRUE, ... )
model |
an object of the class glmgee which is obtained from the fit of a generalized estimating equation. The linear predictor of the model whose fit is stored in this glmgee object is the more complex candidate which should be considered by the variable selection procedure. |
criterion |
an (optional) character string indicating the criterion which should be used to compare the candidate models. The available options are: QIC ("qic"), QICu ("qicu"), p-value of a statistical test ("p-value") and adjusted deviance-based R-squared ("adjr2"). By default, |
direction |
an (optional) character string indicating the mode of variable selection which should be used. The available options are: deleting variables ("backward") and adding variables ("forward"). By default, |
test |
an (optional) character string indicating the statistical test which should be used to compare nested models. The available options are: Wald ("wald") and generalized score ("score") tests. By default, |
level |
an (optional) numeric value in the interval (0,1) indicating the significance level chosen to perform the statistical tests. This is only appropiate if |
verbose |
an (optional) logical switch indicating if should the report of results be printed. By default, |
... |
further arguments passed to or from other methods. For example, |
A list with the following objects:
initial
: an expression describing the linear predictor of the "initial" model.
final
: an expression describing the linear predictor of the "final" model.
criterion
: a character string describing the criterion chosen to compare the candidate models.
## Example 1 mod <- size ~ poly(days,4)*treat fit1 <- glmgee(mod, id=tree, family=Gamma("log"), data=spruce, corstr="AR-1") stepCriterion(fit1, criterion="p-value", direction="forward") stepCriterion(fit1, criterion="p-value", direction="backward") ## Example 2 mod <- depressd ~ visit*group fit2 <- glmgee(mod, id=subj, family=binomial("logit"), corstr="AR-1", data=depression) stepCriterion(fit2, criterion="qic", direction="forward") stepCriterion(fit2, criterion="qic", direction="backward")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.