Usage
# glmulti S4 generic
glmulti(y, xr, data, exclude = c(), name = "glmulti.analysis", intercept = TRUE, marginality = FALSE, bunch=30, chunk = 1, chunks = 1,
level = 2, minsize = 0, maxsize = -1, minK = 0, maxK = -1, method = "h", crit = "aic", confsetsize = 100, popsize = 100, mutrate = 10^-3, sexrate = 0.1, imm = 0.3, plotty = TRUE, report = TRUE, deltaM = 0.05, deltaB = 0.05, conseq = 5, fitfunction = "glm", resumefile = "id", includeobjects=TRUE, ...)
Arguments
y
A formula, character string, or fitted model (of class lm or glm)
specifying the response variable and the terms (main effects and/or interactions) to be used in the candidate models (e.g. height~age*sex+mass).
Alternatively, a character string naming t
xr
An optional character array specifying the variables (categorical or quantitative) to be used as predictors, e.g. c("age", "height" , "mass")
exclude
Optional character vector naming terms (main effects or interactions) to be excluded from the candidate models, e.g. c("mass:height")
intercept
Whether to include an intercept in the candidate models or not.
level
If 1, only main effects (terms of order 1) are used to build the candidate set.
If 2, pairwise interactions are also used (higher order interactions are currently ignored)
data
A data.frame containing the data. If not specified, glmulti will try to find the data in the environment of the formula,
from the fitted model passed as y argument, or from the global environment.
name
The name of this glmulti analysis. Optional.
marginality
Whether to apply the marginality rule or not. If TRUE, only marginal models will be considered.
minsize
This sets a constraint on candidate models. Minimal number of TERMS (main effects or interactions) to be included in candidate models (negative = no constraint)
maxsize
This sets a constraint on candidate models. Maximal number of TERMS to be included in candidate models (negative = no constraint)
minK
This sets a constraint on candidate models. Minimal complexity of candidate models (negative = no constraint)
maxK
This sets a constraint on candidate models. Maximal complexity of candidate models (negative = no constraint)
method
The method to be used to explore the candidate set of models. If "h" an exhaustive screening is undertaken. If "g" the genetic algorithm is employed (recommended for large candidate sets).
If "l", a very fast exhaustive branch-and-bound algorithm is us
crit
The Information Criterion to be used. This should be a function that accepts a fitted model as first argument. Default is the original Akaike IC (aic).
Other provided functions are the Bayes IC (bic), the small-sample corrected AIC (ai
fitfunction
The fitting function to be used. Any function similar to glm can be used. See Examples
confsetsize
The number of models to be looked for, i.e. the size of the returned confidence set.
plotty
Whether to plot the progress of the IC profile when running.
report
Whether to report about the progress at run time.
bunch
The number of model formulas to be returned (to be fitted) at each call to the enumerator. Exhaustive screening only.
chunk
When using an exhaustive screening approach, it can be splitted in several parts to take advantage of multiple CPUs.
chunk is an integer specifying which part the current call should perform.
chunks
When splitting an exhaustive screening, the total number of parts the task should be divided into.
For example, with a quad-core processor, 4 may be useful. Use consensus to bring back the pieces into a single object.
popsize
The population size for the genetic algorithm
mutrate
The per locus (i.e. per term) mutation rate for genetic algorithm, between 0 and 1
sexrate
The rate of sexual reproduction for the genetic algorithm, between 0 and 1
imm
The rate of immigration for the genetic algorithm, between 0 and 1
deltaM
The target change in mean IC (defines the stop rules for the genetic algorithm)
deltaB
The target change in best IC (defines the stop rules for the genetic algorithm)
conseq
The target successive number of times with no improvement (i.e. target changes have been attained) (defines the stop rule for the GA). The greater it is, the more stringent the stop rule.
resumefile
When resuming an analysis (method="r"), the name of the files from which to resume. Default uses the same as name
includeobjects
Whether or not to include fiited models as objects. This makes coef and predict faster and is very convenient, but can be turned off in case fitted models are very large or are not to be used after.
...
Further arguments to be passed to the fitting function. E.g. maxit=50 or family=binomial