fit.models(model.list, formula=NULL, ...)
model.list
is a list of function names
the second argument is often a formula. This saves you the trouble of
having to name it explicitly when calling fit.models.
To be comparable the specified models must all belong to one of the supported classes in fit.models. The supported classes of models in this release of the Robust Library are (1) ANOVA models {"aov", "aovRob"}, (2) Asymmetric Distribution Models {"gammaMLE", "gammaRob", "lognormMLE", "lognormRob", "weibullMLE", "weibullRob"}, (3) Covariance/Correlation Models {"cov", "covRob"}, (4) Discriminant Analysis Models {"disrcim", "discRob"}, (5) Generalized Linear Models {"glm", "glmRob"}, (6) Linear Models {"lm", "lmRob"}, and (7) Principal Components Models {"princomp", "princompRob"}. The class information is stored in the virtual.class attribute and is used to dispatch the correct method for generic function calls.
# The following three examples are equivalent. # Using fit.models with a list of calls my.models <- list(Robust=call("lmRob", formula=substitute(Loss ~ .), data=substitute(stack.dat)), LS=call("lm", formula=substitute(Loss ~ .), data=substitute(stack.dat))) stack.fm <- fit.models(my.models) stack.fm # Using fit.models with a list of function names stack.fm <- fit.models(list(Robust="lmRob", LS="lm"), Loss ~ ., data = stack.dat) stack.fm # Using fit.models to coerce already fitted models into a fit.models object Robust <- lmRob(Loss ~ ., data=stack.dat) LS <- lm(Loss ~ ., data=stack.dat) stack.fm <- fit.models(Robust, LS) stack.fm