Description Usage Arguments Value Examples

View source: R/model_weights.R

Compute model weights in various ways, for instance, via stacking of posterior predictive distributions, Akaike weights, or marginal likelihoods.

1 2 3 4 | ```
## S3 method for class 'brmsfit'
model_weights(x, ..., weights = "stacking", model_names = NULL)
model_weights(x, ...)
``` |

`x` |
A |

`...` |
More |

`weights` |
Name of the criterion to compute weights from. Should be one
of |

`model_names` |
If |

A numeric vector of weights for the models.

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
## Not run:
# model with 'treat' as predictor
fit1 <- brm(rating ~ treat + period + carry, data = inhaler)
summary(fit1)
# model without 'treat' as predictor
fit2 <- brm(rating ~ period + carry, data = inhaler)
summary(fit2)
# obtain Akaike weights based on the WAIC
model_weights(fit1, fit2, weights = "waic")
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.