modelAverage: Averaging of OpenCR Models Using Akaike's Information...

modelAverageR Documentation

Averaging of OpenCR Models Using Akaike's Information Criterion

Description

AIC- or AICc-weighted average of estimated ‘real’ or ‘beta’ parameters from multiple fitted openCR models.

The modelAverage generic is imported from secr (>= 4.5.0).

Usage


## S3 method for class 'openCR'
modelAverage(object, ..., realnames = NULL, betanames = NULL, 
    newdata = NULL, alpha = 0.05, dmax = 10, covar = FALSE, average = c("link", 
    "real"), criterion = c("AIC","AICc"), CImethod = c("Wald", "MATA"))
    
## S3 method for class 'openCRlist'
modelAverage(object, ..., realnames = NULL, betanames = NULL, 
    newdata = NULL, alpha = 0.05, dmax = 10, covar = FALSE, average = c("link", 
    "real"), criterion = c("AIC","AICc"), CImethod = c("Wald", "MATA"))

Arguments

object

openCR or openCRlist objects

...

other openCR objects (modelAverage.openCR() only)

realnames

character vector of real parameter names

betanames

character vector of beta parameter names

newdata

optional dataframe of values at which to evaluate models

alpha

alpha level for confidence intervals

dmax

numeric, the maximum AIC or AICc difference for inclusion in confidence set

covar

logical, if TRUE then return variance-covariance matrix

average

character string for scale on which to average real parameters

criterion

character, information criterion to use for model weights

CImethod

character, type of confidence interval (see Details)

Details

Models to be compared must have been fitted to the same data and use the same likelihood method (full vs conditional). If realnames = NULL and betanames = NULL then all real parameters will be averaged; in this case all models must use the same real parameters. To average beta parameters, specify betanames (this is ignored if a value is provided for realnames). See predict.openCR for an explanation of the optional argument newdata; newdata is ignored when averaging beta parameters.

Model-averaged estimates for parameter theta are given by

theta-hat = sum( w_k * theta-hat_k)

where the subscript k refers to a specific model and the w_k are AIC or AICc weights (see AIC.openCR for details). Averaging of real parameters may be done on the link scale before back-transformation (average="link") or after back-transformation (average="real").

Models for which dAIC > dmax (or dAICc > dmax) are given a weight of zero and effectively are excluded from averaging.

Also,

var(theta-hat) = sum(w_k (var(theta-hat_k) + beta_k^2))

where beta-hat_k = theta-hat_k -- theta-hat and the variances are asymptotic estimates from fitting each model k. This follows Burnham and Anderson (2004) rather than Buckland et al. (1997).

Two methods are offered for confidence intervals. The default ‘Wald’ uses the above estimate of variance. The alternative ‘MATA’ (model-averaged tail area) avoids estimating a weighted variance and is thought to provide better coverage at little cost in increased interval length (Turek and Fletcher 2012). Turek and Fletcher (2012) also found averaging with AIC weights (here criterion = 'AIC') preferable to using AICc weights, even for small samples. CImethod does not affect the reported standard errors.

Value

A list (one component per parameter) of model-averaged estimates, their standard errors, and a 100(1-alpha)% confidence interval. The interval for real parameters is backtransformed from the link scale. If there is only one row in newdata or beta parameters are averaged or averaging is requested for only one parameter then the array is collapsed to a matrix. If covar = TRUE then a list is returned with separate components for the estimates and the variance-covariance matrices.

References

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

Burnham, K. P. and Anderson, D. R. (2002) Model Selection and Multimodel Inference: A Practical Information-Theoretic Approach. Second edition. New York: Springer-Verlag.

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

Turek, D. and Fletcher, D. (2012) Model-averaged Wald confidence intervals. Computational statistics and data analysis 56, 2809–2815.

See Also

AIC.openCR, make.table, openCR.fit, openCRlist

Examples


## Compare two models fitted previously

cjs1 <- openCR.fit(dipperCH, model=p~1)
cjs2 <- openCR.fit(dipperCH, model=p~session)
AIC(cjs1, cjs2)
modelAverage(cjs1, cjs2)

## or
cjs12 <- openCRlist(cjs1, cjs2)
modelAverage(cjs12)


openCR documentation built on Sept. 25, 2022, 5:06 p.m.