pairwise_contrasts: posterior predictive contrasts for all pairwise comparisons...

Description Usage Arguments Value Examples

Description

posterior predictive contrasts for all pairwise comparisons in a list

Usage

1
2
pairwise_contrasts(stanreg, cdata, width = 0.95, yfun = median,
  pp_all = FALSE, ...)

Arguments

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 prob argument from posterior_interval.

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 cdata. Default is median.

pp_all

posterior predictions for each list item in cdata. Defaults to FALSE

...

additional parameters passed to the function posterior_predict posterior_interval.

Value

list containing CI matrix and posterior differences

Examples

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

iamamutt/rbaes documentation built on May 18, 2019, 1:27 a.m.