Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates goodness of fit measures for regressions of a single response variable to all combinations of N predictor variables
1 2 3 4 5 6 7 8 | all.regs(y, xcan,
fam = c("gaussian", "binomial", "Gamma", "inverse.gaussian",
"poisson","quasi", "quasibinomial","quasipoisson",
"beta","ordinal"),
link = c("logit", "probit", "cloglog", "cauchit", "loglog",
"identity","inverse","1/mu^2","log","sqrt"),
gof = c("Rsqu", "RMSPE", "logLik"),
print.vars = FALSE, ...)
|
y |
a vector containing the response variable |
xcan |
a data.frame containing the n predictors |
family |
a character string naming a family function used by |
link |
character specification of the link function. For "beta", this argument
equals the "link" argument in |
gof |
Goodness-of-fit measure. Currently "RMSPE", Root-mean-square 'prediction' error, "logLik", Log-Likelihood or "Rsqu", R-squared. R-squared is only applicable if family = "Gaussian". |
print.vars |
if FALSE, the function returns a vector of goodness-of-fit measures. If TRUE, a data frame is returned with first column listing predictor variable combinations and the second column listing goodness-of-fit measures. |
... |
additional arguments to passed to |
This function calculates goodness of fit measures for the entire
hierarchy of models using all combinations of N predictors, and
returns them as an ordered list ready for input into the function
partition
.
gfs |
If print.vars is FALSE, a vector of goodness of fit measures for all combinations of predictors in the hierarchy or, if print.vars is TRUE, a data frame listing all combinations of predictor variables in the first column in ascending order, and the corresponding goodness of fit measure for the model using those variables |
Chris Walsh cwalsh@unimelb.edu.au.
Hatt, B. E., Fletcher, T. D., Walsh, C. J. and Taylor, S. L. 2004 The influence of urban density and drainage infrastructure on the concentrations and loads of pollutants in small streams. Environmental Management 34, 112–124.
Walsh, C. J., Papas, P. J., Crowther, D., Sim, P. T., and Yoo, J. 2004 Stormwater drainage pipes as a threat to a stream-dwelling amphipod of conservation significance, Austrogammarus australis, in southeastern Australia. Biodiversity and Conservation 13, 781–793.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #linear regression of log(electrical conductivity) in streams
#against seven independent variables describing catchment
#characteristics (from Hatt et al. 2004).
data(urbanwq)
env <- urbanwq[,2:8]
all.regs(urbanwq$lec, env, fam = "gaussian", gof = "Rsqu",
print.vars = TRUE)
#logistic regression of an amphipod species occurrence in
#streams against four independent variables describing
#catchment characteristics (from Walsh et al. 2004).
data(amphipod)
env1 <- amphipod[,2:5]
all.regs(amphipod$australis, env1, fam = "binomial",
gof = "logLik", print.vars = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.