Description Usage Arguments Value Examples
posterior predictive contrasts for all pairwise comparisons in a list
1 2 | pairwise_contrasts(stanreg, cdata, width = 0.95, yfun = median,
pp_all = FALSE, ...)
|
stanreg |
stanreg object from rstanarm. |
cdata |
a list of data sets to use to find posterior predictions of each. |
width |
confidence interval width. Sent to the |
yfun |
the stat function to use to collapse the predictions into a
scalar value. Corresponds to the average of the predicted responses for each
data set in |
pp_all |
posterior predictions for each list item in cdata. Defaults to
|
... |
additional parameters passed to the function |
list containing CI matrix and posterior differences
1 2 3 4 5 6 | stanreg <- example_stanreg()
cdata <- list(
c1 = contrast_data(stanreg, TRUE, margin_ignore = 'floor', subset_expression = .~ log_uranium < -0.5),
c2 = contrast_data(stanreg, TRUE, margin_ignore = 'floor', subset_expression = .~ log_uranium >= -0.5 & log_uranium <= 0.5),
c3 = contrast_data(stanreg, TRUE, margin_ignore = 'floor', subset_expression = .~ log_uranium > 0.5))
pairwise_contrasts(stanreg, cdata)$ci.cont
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.