stepCriterion.glmgee | R Documentation |
Performs variable selection in generalized estimating equations using hybrid versions of forward stepwise and backward stepwise.
## S3 method for class 'glmgee'
stepCriterion(
model,
criterion = c("p-value", "qic", "qicu", "agpc", "sgpc"),
test = c("wald", "score"),
direction = c("forward", "backward"),
levels = c(0.05, 0.05),
trace = TRUE,
scope,
digits = max(3, getOption("digits") - 2),
varest = c("robust", "df-adjusted", "model", "bias-corrected"),
force.in,
force.out,
...
)
model |
an object of the class |
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"), Akaike-type penalized gaussian pseudo-likelihood criterion ("agpc"),
Schwarz-type penalized gaussian pseudo-likelihood criterion ("sgpc") and p-value of the |
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. As default, |
direction |
an (optional) character string indicating the type of procedure which should be used. The available
options are: hybrid backward stepwise ("backward") and hybrid forward stepwise ("forward"). As default, |
levels |
an (optional) two-dimensional vector of values in the interval |
trace |
an (optional) logical switch indicating if should the stepwise reports be printed. By default,
|
scope |
an (optional) list, containing components |
digits |
an (optional) integer indicating the number of digits which should be used to print the most of the
criteria to compare the candidate models. As default, |
varest |
an (optional) character string indicating the type of estimator which should be used to the variance-covariance matrix of the interest parameters in the Wald-type test. The available options are: robust sandwich-type estimator ("robust"), degrees-of-freedom-adjusted estimator ("df-adjusted"), bias-corrected estimator ("bias-corrected"), and the model-based or naive estimator ("model"). As default, |
force.in |
an (optional) formula-type object indicating the effects that should be in all models |
force.out |
an (optional) formula-type object indicating the effects that should be in no models |
... |
further arguments passed to or from other methods. For example, |
A list which contains the following objects:
initial
a character string indicating the linear predictor of the "initial model".
direction
a character string indicating the type of procedure which was used.
criterion
a character string indicating the criterion used to compare the candidate models.
final
a character string indicating the linear predictor of the "final model".
final.fit
an object of class glmgee
with the results of the fit to the data of the "final model".
'
James G., Witten D., Hastie T., Tibshirani R. (2013, page 210) An Introduction to Statistical Learning with Applications in R. Springer, New York.
Jianwen X., Jiamao Z., Liya F. (2019) Variable selection in generalized estimating equations via empirical likelihood and Gaussian pseudo-likelihood. Communications in Statistics - Simulation and Computation 48:1239-1250.
stepCriterion.lm, stepCriterion.glm, stepCriterion.overglm
###### Example 1: Effect of ozone-enriched atmosphere on growth of sitka spruces
data(spruces)
mod <- size ~ poly(days,4)*treat
fit1 <- glmgee(mod, id=tree, family=Gamma(log), data=spruces, corstr="AR-M-dependent")
stepCriterion(fit1, criterion="p-value", direction="forward", scope=list(upper=mod),force.in=~treat)
###### Example 2: Treatment for severe postnatal depression
data(depression)
mod <- depressd ~ visit*group
fit2 <- glmgee(mod, id=subj, family=binomial(probit), corstr="AR-M-dependent", data=depression)
stepCriterion(fit2, criterion="agpc", direction="forward", scope=list(upper=mod),force.in=~group)
###### Example 3: Treatment for severe postnatal depression (2)
mod <- dep ~ visit*group
fit2 <- glmgee(mod, id=subj, family=gaussian(identity), corstr="AR-M-dependent", data=depression)
stepCriterion(fit2, criterion="sgpc", direction="forward", scope=list(upper=mod),force.in=~group)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.