get_condition_post: Combine coefficient samples from a Stan model with the design...

Description Usage Arguments Value

View source: R/get_condition_post.R

Description

Combine coefficient samples from a Stan model with the design matrix to compute posterior samples on the conditions of the design.

Usage

1
2
get_condition_post(from_stan, par, X = NULL, W = NULL, B = NULL,
  numeric_res = 0, collapse_intercept_to_median = FALSE)

Arguments

from_stan

A stanfit object from a call to rstan::stan() or rstan::sampling() containing posterior samples from the model.

par

Character string naming the parameter on which to compute the summary table.

X

Optional contrast matrix as yielded from get_contrast_matrix() indicating the contrasts passed as data when creating the above stanfit object.

W

Optional contrast matrix as yielded from get_contrast_matrix() indicating the within-subjects contrasts passed as data when creating the above stanfit object. If present, X is ignored and B must be present.

B

Optional contrast matrix as yielded from get_contrast_matrix() indicating the between-subjects contrasts passed as data when creating the above stanfit object. W must be present, else B is ignored.

numeric_res

Integer value conveying the number of points within the range of a continuous variable to sample. If 0, the values from the data are used.

collapse_intercept_to_median

Logical indicating whether to use the median of the samples for the intercept rather than its full set of samples. Assumes that the intercept is the first parameter.

Value

If the 'tibble' package is installed, a tibble; else, a data frame.


mike-lawrence/ezStan documentation built on June 20, 2018, 6:45 p.m.