glmulti(y, xr, data, exclude=c(), intercept=TRUE, marginality=FALSE, level=2, filename="glmulti.output", method="h", crit="aicc", chunk=1, chunks=1, minsize=0, maxsize=-1, minK=0, maxK=-1, plotty=TRUE, confsetsize=100, popsize=100, mutrate=10^-3,sexrate=0.1,imm=0.3, deltaM=0.05, deltaB=0.05, conseq=5, fitfunc=glm, resumefile = "id", ...)
chunks
parts) this program should do.maxit=50
or family=binomial
filename
). This text file is a data frame (tab separated), that can be read with R, OpenOffice Calc, MS Excel or any similar software. Lines are the models in the candidate set, and columns are properties of these models, most iportantly their GLM formula, their Information Criterion, and their complexity (number of parameters estimated from the data).
From this file, lots of analyses can be performed without fitting any additional model (e.g. model averaging).
When using method="d"
, returns the number of models in the candidate set (see Examples).
When running a GA, two tiny java files (serialized objects) are also written to the disk at regular intervals. They can be used to resume the calculation (method="r"
) if it was interrupted for any reason. This can also be used to continue a GA with modified parameters (e.g. mutation rate).fitfunc
.step
and stepAIC
in package MASS# For a range of examples see the article by Calcagno & de Mazancourt.
# This simply returns the number of candidate models if one has 2 covariates and 2 factors of three levels each, considers pairwise interactions and does not apply marginality
# First we make a dummy data frame
dummyfactor=as.factor(c(rep("y",5),rep("yn",5),rep("n",10)))
dummycovariate = 1:20
dod = data.frame(2:21,dummyfactor,dummyfactor,dummycovariate,dummycovariate)
# Then we call glmulti
glmulti(names(dod)[1],names(dod)[-1], data=dod, method="d")
# There are 250 models to compare
Run the code above in your browser using DataLab