View source: R/Custom.functions.R
modavgIC | R Documentation |
This function model-averages the estimate of a parameter of interest among a set of candidate models, and computes the unconditional standard error and unconditional confidence intervals as described in Buckland et al. (1997) and Burnham and Anderson (2002). Computations are based on the values of the information criterion supplied manually by the user.
modavgIC(ic, K, modnames = NULL, estimate, se, uncond.se = "revised",
conf.level = 0.95, ic.name = NULL)
ic |
a vector of information criterion values for each model in the candidate model set. |
K |
a vector containing the number of estimated parameters for each model in the candidate model set. |
modnames |
a character vector of model names to identify each model in the
model selection table. If |
estimate |
a vector of estimates for each of the models in the candidate model set. Estimates can be either beta estimates for a parameter of interest or a single prediction from each model. |
se |
a vector of standard errors for each of the estimates appearing in the
|
uncond.se |
either, |
conf.level |
the confidence level ( |
ic.name |
a character string denoting the name of the information criterion input by the user. This character string will appear in certain column labels of the model selection table. |
modavgIC
computes a model-averaged estimate from the vector
of parameter estimates specified in estimate
. Estimates and
their associated standard errors must be specified in the same order
as the values of the information criterion, the number of estimated
parameters, and the model names. Estimates provided may be for a
parameter of interest (i.e., beta estimates) or predictions from each
model. This function is most useful for information criterion other
than AIC, AICc, QAIC, and QAICc (e.g., WAIC: Watanabe 2010) or for
classes not supported by modavg
, modavgCustom
, or
modavgPred
.
modavgIC
creates an object of class modavgIC
with
the following components:
Mod.avg.table |
the model selection table. |
Mod.avg.est |
the model-averaged estimate. |
Uncond.SE |
the unconditional standard error for the model-averaged estimate. |
Conf.level |
the confidence level used to compute the confidence interval. |
Lower.CL |
the lower confidence limit. |
Upper.CL |
the upper confidence limit. |
Marc J. Mazerolle
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.
Watanabe, S. (2010) Asymptotic equivalence of Bayes cross validation and widely applicable information criterion in singular learning theory. Journal of Machine Learning Research 11, 3571–3594.
aictabCustom
, ictab
,
modavg
, modavgCustom
,
modavgShrink
, modavgPred
## Not run:
##model averaging parameter estimate based on WAIC
##create a vector of names to trace back models in set
Modnames <- c("global model", "interactive model",
"additive model", "invertpred model")
##WAIC values
waic <- c(105.74, 107.36, 108.24, 100.57)
##number of effective parameters
effK <- c(7.45, 5.61, 6.14, 6.05)
##vector of predictions
Preds <- c(0.106, 0.137, 0.067, 0.050)
##vector of SE's for prediction
Ses <- c(0.128, 0.159, 0.054, 0.039)
##compute model-averaged estimate and unconditional SE based on WAIC
modavgIC(ic = waic, K = effK, modnames = Modnames,
estimate = Preds, se = Ses,
ic.name = "WAIC")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.