glmbb(big, little = ~ 1, family = poisson, data,
criterion = c("AIC", "AICc", "BIC"), cutoff = 10,
trace = FALSE, ...)big). Default is ~ 1. Model specified must
be nested within the model spas.data.frame to a data frame)
containing the variables in the models. If not found in data, the
varia"AIC" (Akaike Information Criterion, the default),
"BIC" (Bayes Information Criterion) or "AICc" (AIC corrected
for sample size).big and supermodels of
little with information criterion less than or equal to the
cutoff plus the minimum information criteTRUE.stats{glm.fit}."glmbb" containing at least the following
components:little.big.criterion.cutoff.big is something like foo ~ bar * baz * qux
where foo is the response variable (or matrix when family is
binomial or quasibinomial,
see glm) and bar, baz, and qux
are all the predictors that are considered for inclusion in models. A model is hierarchical if it includes all lower-order interactions for each
term. This is automatically what formulas with all variables connected by
stars (*) do, like the example above.
But other specifications are possible.
For example, foo ~ (bar + baz + qux)^2 specifies the model with all
main effects, and all two-way interactions, but no three-way interaction,
and this is hierarchical.
A model $m_1$ is nested within a model $m_1$ if all terms
in $m_1$ are also terms in $m_2$. The default little model
~ 1 is nested within every model except those specified to have
no intercept by 0 + or some such (see link[stats]{formula}).
link[stats]{family},
link[stats]{formula},
link[stats]{glm},data(crabs)
gout <- glmbb(satell ~ (color + spine + width + weight)^3,
criterion = "BIC", data = crabs)
summary(gout)Run the code above in your browser using DataLab