ensemble | R Documentation |
Uses link
and sim
for a list of map
or map2stan
model fits to construct Akaike weighted ensemble of predictions.
ensemble( ... , data , n=1e3 , func=WAIC , weights , WAIC=TRUE , refresh=0 ,
replace=list() , do_link=TRUE , do_sim=TRUE )
... |
|
data |
Optional data to compute predictions over, as in |
n |
Number of samples to draw from posterior for each model |
func |
Function to use in computing criterion for model weights |
weights |
Optional vector of weights to use. If present, |
WAIC |
Deprecated: If |
refresh |
Progress update refresh interval. 0 suppresses output. |
replace |
Optional named list with replacement posterior samples. Used for maginalizing over random effects, for example. See example in |
do_link |
If |
do_sim |
If |
This function calls link
and sim
for each fit model given as input. The results are then combined into ensemble link and simulation output, where samples from each model are represented in proportion to the Akaike weights. Akaike weights are calculated by compare
, using func
, unless an explicit vector weights
is provided. The values in weights
will be normalized to sum to one, if they do not already.
Note that no averaging is done by this function. Parameters are not averaged, and predictions are not averaged.
Richard McElreath
link
, sim
, compare
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.