get_exposure_category_statistic_from_stanfit: Get category sample mean or covariance matrix of exposure...

View source: R/get-info-from-NIW-IA-stanfit.R

get_exposure_category_statistic_from_stanfitR Documentation

Get category sample mean or covariance matrix of exposure data from NIW IBBU stanfit.

Description

Returns the category means mu and/or category covariance matrix Sigma for the exposure data for an incremental Bayesian belief-updating (IBBU) model from an NIW IBBU stanfit or NIW belief MCMC object.

Usage

get_exposure_category_statistic_from_stanfit(
  fit,
  categories = get_category_levels_from_stanfit(fit),
  groups = get_group_levels_from_stanfit(fit, include_prior = FALSE),
  statistic = c("n", "mean", "css", "uss", "cov"),
  untransform_cues = TRUE
)

get_exposure_mean_from_stanfit(...)

get_exposure_css_from_stanfit(...)

get_exposure_uss_from_stanfit(...)

get_exposure_cov_from_stanfit(...)

Arguments

fit

An NIW_ideal_adaptor_stanfit.

categories

Character vector with categories for which category statistics are to be returned. (default: all categories)

groups

Character vector with groups for which category statistics are to be returned. (default: all groups except '"prior"')

statistic

Which exposure statistic should be returned? 'n' for number of observations, 'mean' for category mean, 'css' or 'uss' for centered or uncentered category sum-of-square matrix, 'cov' for the category covariance matrix, or a character vector with any combination thereof. (default: all)

untransform_cues

Should statistics be transformed back into the original cue space? (default: 'TRUE')

Value

If just one group and category was requested, a vector (for the mean) or matrix (for the covariance matrix). If more than one group or category was requested, a tibble with one row for each unique combination of group and category.

See Also

TBD


hlplab/MVBeliefUpdatr documentation built on March 29, 2025, 10:42 p.m.