reverse.exclude reverse the order of
variables in an interaction term.
formatCands creates new classes for lists containing candidate
1 2 3
a parameter to be model-averaged, enclosed between quotes, as it appears in the output of some models.
a list of interaction or polynomial terms appearing in some models, as
they would appear in the call to the model function (i.e.,
a list storing each of the models in the candidate model set.
These utility functions are used internally by
modavg, and other related functions.
reverse.exclude enable the user to
specify differently interaction terms (e.g.,
across models for model averaging. These functions have been added to
avoid problems when users are not consistent in the specification of
interaction terms across models.
formatCands creates new classes for the list of candidate
models based on the contents of the list. These new classes are used
for method dispatch.
reverse.parm returns all possible combinations of an interaction
term to identify models that include the
parm of interest and
find the corresponding estimate and standard error in the model object.
reverse.exclude returns a list of all possible combinations of
exclude to identify models that should be excluded when
computing a model-averaged estimate.
formatCands adds a new class to the list of candidate
models based on the classes of the models.
Marc J. Mazerolle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
##a main effect reverse.parm(parm = "Ageyoung") #does not return anything ##an interaction term as it might appear in the output reverse.parm(parm = "Ageyoung:time") #returns the reverse ##exclude two interaction terms reverse.exclude(exclude = list("Age*time", "A:B")) ##returns all combinations reverse.exclude(exclude = list("Age:time", "A*B")) ##returns all combinations ##Mazerolle (2006) frog water loss example data(dry.frog) ##setup a subset of models of Table 1 Cand.models <- list( ) Cand.models[] <- lm(log_Mass_lost ~ Shade + Substrate + cent_Initial_mass + Initial_mass2, data = dry.frog) Cand.models[] <- lm(log_Mass_lost ~ Shade + Substrate + cent_Initial_mass + Initial_mass2 + Shade:Substrate, data = dry.frog) Cand.models[] <- lm(log_Mass_lost ~ cent_Initial_mass + Initial_mass2, data = dry.frog) formatCands(Cand.models)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.