Learn R Programming

AICcmodavg (version 2.3-4)

modavgEffect: Compute Model-averaged Effect Sizes (Multimodel Inference on Group Differences)

Description

This function model-averages the effect size between two groups defined by a categorical variable based on the entire model set and computes the unconditional standard error and unconditional confidence intervals as described in Buckland et al. (1997) and Burnham and Anderson (2002). This can be particularly useful when dealing with data from an experiment (e.g., ANOVA) and when the focus is to determine the effect of a given factor. This is an information-theoretic alternative to multiple comparisons (e.g., Burnham et al. 2011).

Usage

modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE,
             nobs = NULL, uncond.se = "revised", conf.level = 0.95,
             ...)

# S3 method for AICaov.lm modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, ...)

# S3 method for AICglm.lm modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, gamdisp = NULL, ...)

# S3 method for AICgls modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, ...)

# S3 method for AIClm modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, ...)

# S3 method for AIClme modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, ...)

# S3 method for AICmer modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", ...)

# S3 method for AICglmerMod modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", ...)

# S3 method for AIClmerMod modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, ...)

# S3 method for AIClmerModLmerTest modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, ...)

# S3 method for AICnegbin.glm.lm modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", ...)

# S3 method for AICrlm.lm modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, ...)

# S3 method for AICsurvreg modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", ...)

# S3 method for AICunmarkedFitOccu modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitColExt modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitOccuRN modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitPCount modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitPCO modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitDS modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitGDS modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitOccuFP modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitMPois modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitGMM modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitGPC modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitOccuTTD modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitMMO modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitDSO modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitOccuMS modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitOccuMulti modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitGOccu modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

# S3 method for AICunmarkedFitOccuComm modavgEffect(cand.set, modnames = NULL, newdata, second.ord = TRUE, nobs = NULL, uncond.se = "revised", conf.level = 0.95, type = "response", c.hat = 1, parm.type = NULL, ...)

Value

The result is an object of class modavgEffect with the following components:

Group.variable

the grouping variable defining the two groups compared.

Group1

the first group considered in the comparison.

Group2

the second group considered in the comparison.

Type

the scale on which the model-averaged effect size was computed (e.g., response or link).

Mod.avg.table

the full model selection table including the entire set of candidate models.

Mod.avg.eff

the model-averaged effect size based on the entire candidate model set.

Uncond.SE

the unconditional standard error for the model-averaged effect size.

Conf.level

the confidence level used to compute the confidence interval.

Lower.CL

the lower confidence limit.

Upper.CL

the upper confidence limit.

Matrix.output

a matrix containing the model-averaged effect size, the unconditional standard error, and the lower and upper confidence limits.

Arguments

cand.set

a list storing each of the models in the candidate model set.

modnames

a character vector of model names to facilitate the identification of each model in the model selection table. If NULL, the function uses the names in the cand.set list of candidate models. If no names appear in the list, generic names (e.g., Mod1, Mod2) are supplied in the table in the same order as in the list of candidate models.

newdata

a data frame with two rows and where the columns correspond to the explanatory variables specified in the candidate models. Note that this data set must have the same structure as that of the original data frame for which we want to make predictions, specifically, the same variable type and names that appear in the original data set. Each row of the data set defines one of the two groups compared. The first row in newdata defines the first group, whereas the second row defines the second group. The effect size is computed as the prediction in the first row minus the prediction in the second row (first row - second row). Only the column relating to the grouping variable can change value and all others must be held constant for the comparison (see 'Details'). For community occupancy models of unmarkedFitOccuComm classes, the newdata data frame must include a column specifying the name of the species for which each prediction is requested (see 'Examples' below).

second.ord

logical. If TRUE, the function returns the second-order Akaike information criterion (i.e., AICc).

nobs

this argument allows the specification of a numeric value other than total sample size to compute the AICc (i.e., nobs defaults to total number of observations). This is relevant only for mixed models or various models of unmarkedFit classes where sample size is not straightforward. In such cases, one might use total number of observations or number of independent clusters (e.g., sites) as the value of nobs.

uncond.se

either, "old", or "revised", specifying the equation used to compute the unconditional standard error of a model-averaged estimate. With uncond.se = "old", computations are based on equation 4.9 of Burnham and Anderson (2002), which was the former way to compute unconditional standard errors. With uncond.se = "revised", equation 6.12 of Burnham and Anderson (2002) is used. Anderson (2008, p. 111) recommends use of the revised version for the computation of unconditional standard errors and it is now the default. Note that versions of package AICcmodavg < 1.04 used the old method to compute unconditional standard errors.

conf.level

the confidence level (\(1 - \alpha\)) requested for the computation of unconditional confidence intervals. To obtain confidence intervals corrected for multiple comparisons between pairs of treatments, it is possible to adjust the \(\alpha\) level according to various strategies such as the Bonferroni correction (Dunn 1961).

type

the scale of prediction requested, one of "response" or "link" (only relevant for glm, mer, and unmarkedFit classes). Note that the value "terms" is not defined for modavgEffect).

c.hat

value of overdispersion parameter (i.e., variance inflation factor) such as that obtained from c_hat. Note that values of c.hat different from 1 are only appropriate for binomial GLM's with trials > 1 (i.e., success/trial or cbind(success, failure) syntax), with Poisson GLM's, single-season and dynamic occupancy models (MacKenzie et al. 2002, 2003), or N-mixture models (Royle 2004, Dail and Madsen 2011). If c.hat > 1, modavgEffect will return the quasi-likelihood analogue of the information criteria requested and multiply the variance-covariance matrix of the estimates by this value (i.e., SE's are multiplied by sqrt(c.hat)). This option is not supported for generalized linear mixed models of the mer class.

gamdisp

if gamma GLM is used, the dispersion parameter should be specified here to apply the same value to each model.

parm.type

this argument specifies the parameter type on which the effect size will be computed and is only relevant for models of unmarkedFit classes. The character strings supported vary with the type of model fitted. For unmarkedFitOccu, unmarkedFitOccuMulti, and unmarkedFitOccuComm objects, either psi or detect can be supplied to indicate whether the parameter is on occupancy or detectability, respectively. For unmarkedFitColExt objects, possible values are psi, gamma, epsilon, and detect, for parameters on occupancy in the inital year, colonization, extinction, and detectability, respectively. For unmarkedFitOccuTTD objects, possible values are psi, gamma, epsilon, and detect, for parameters on occupancy in the inital year, colonization, extinction, and time-to-dection (lambda rate parameter), respectively. For unmarkedFitOccuFP objects, one can specify psi, detect, falsepos, and certain, for occupancy, detectability, probability of assigning false-positives, and probability detections are certain, respectively. For unmarkedFitOccuRN objects, either lambda or detect can be entered for abundance and detectability parameters, respectively. For unmarkedFitPCount and unmarkedFitMPois objects, lambda or detect denote parameters on abundance and detectability, respectively. For unmarkedFitPCO, unmarkedFitMMO, and unmarkedFitDSO objects, one can enter lambda, gamma, omega, iota, or detect, to specify parameters on abundance, recruitment, apparent survival, immigration, and detectability, respectively. For unmarkedFitDS objects, lambda and detect are supported. For unmarkedFitGDS, lambda, phi, and detect denote abundance, availability, and detection probability, respectively. For unmarkedFitGMM and unmarkedFitGPC objects, lambda, phi, and detect denote abundance, availability, and detectability, respectively. For unmarkedFitOccuMS objects, psi, phi, and detect denote occupancy, transition, and detection probability, respectively. For unmarkedFitGOccu objects, possible values are psi, phi, or detect, denoting occupancy, availability, and detection probabilities, respectively.

...

additional arguments passed to the function.

Author

Marc J. Mazerolle

Details

The strategy used here to compute effect sizes is to work from the newdata object to create two predictions from a given model and compute the differences and standard errors between both values. This step is executed for each model in the candidate model set, to obtain a model-averaged estimate of the effect size and unconditional standard error. As a result, the newdata argument is restricted to two rows, each for a given prediction. To specify each group, the values entered in the column for each explanatory variable can be identical, except for the grouping variable. In such a case, the function will identify the variable and the assign group names based on the values of the variable. If more than a single variable has different values in its respective column, the function will print generic names in the output to identify the two groups. A sensible choice of value for the explanatory variables to be held constant is the average of the variable.

Model-averaging effect sizes is most useful in true experiments (e.g., ANOVA-type designs), where one wants to obtain the best estimate of effect size given the support of each candidate model. This can be considered as a information-theoretic analog of traditional multiple comparisons, except that the information contained in the entire model set is used instead of being restricted to a single model. See 'Examples' below for applications.

modavgEffect calls the appropriate method depending on the class of objects in the list. The current classes supported include aov, glm, gls, lm, lme, mer, glmerMod, lmerMod, lmerModLmerTest, rlm, survreg, as well as models of unmarkedFitOccu, unmarkedFitColExt, unmarkedFitOccuFP, unmarkedFitOccuRN, unmarkedFitOccuTTD, unmarkedFitPCount, unmarkedFitPCO, unmarkedFitDS, unmarkedFitDSO, unmarkedFitGDS, unmarkedFitMPois, unmarkedFitGMM, unmarkedFitMMO, unmarkedFitGPC, unmarkedFitOccuMS, unmarkedFitOccuMulti, unmarkedFitGOccu, and unmarkedFitOccuComm classes.

References

Anderson, D. R. (2008) Model-based Inference in the Life Sciences: a primer on evidence. Springer: New York.

Buckland, S. T., Burnham, K. P., Augustin, N. H. (1997) Model selection: an integral part of inference. Biometrics 53, 603--618.

Burnham, K. P., Anderson, D. R. (2002) Model Selection and Multimodel Inference: a practical information-theoretic approach. Second edition. Springer: New York.

Burnham, K. P., Anderson, D. R. (2004) Multimodel inference: understanding AIC and BIC in model selection. Sociological Methods and Research 33, 261--304.

Burnham, K. P., Anderson, D. R., Huyvaert, K. P. (2011) AIC model selection and multimodel inference in behaviorial ecology: some background, observations and comparisons. Behavioral Ecology and Sociobiology 65, 23--25.

Dail, D., Madsen, L. (2011) Models for estimating abundance from repeated counts of an open population. Biometrics 67, 577--587.

Dunn, O. J. (1961) Multiple comparisons among means. Journal of the American Statistical Association 56, 52--64.

MacKenzie, D. I., Nichols, J. D., Lachman, G. B., Droege, S., Royle, J. A., Langtimm, C. A. (2002) Estimating site occupancy rates when detection probabilities are less than one. Ecology 83, 2248--2255.

MacKenzie, D. I., Nichols, J. D., Hines, J. E., Knutson, M. G., Franklin, A. B. (2003) Estimating site occupancy, colonization, and local extinction when a species is detected imperfectly. Ecology 84, 2200--2207.

Mazerolle, M. J. (2006) Improving data analysis in herpetology: using Akaike's Information Criterion (AIC) to assess the strength of biological hypotheses. Amphibia-Reptilia 27, 169--180.

Royle, J. A. (2004) N-mixture models for estimating population size from spatially replicated counts. Biometrics 60, 108--115.

See Also

AICc, aictab, c_hat, confset, evidence, importance, modavgShrink, modavgPred