update_NIW_ideal_adaptor_incrementally: Update NIW prior beliefs about multivariate Gaussian category...

update_NIW_ideal_adaptor_incrementallyR Documentation

Update NIW prior beliefs about multivariate Gaussian category based on exposure data.

Description

Returns updated/posterior beliefs about the Gaussian categories based on conjugate NIW prior.

Usage

update_NIW_ideal_adaptor_incrementally(
  prior,
  exposure,
  exposure.category = "category",
  exposure.cues = get_cue_labels_from_model(prior),
  exposure.order = NULL,
  noise_treatment = if (is.NIW_ideal_adaptor(prior)) {
     if
    (!is.null(first(prior$Sigma_noise))) 
         "marginalize"
     else "no_noise"
 }
    else "no_noise",
  lapse_treatment = if (is.NIW_ideal_adaptor(prior)) "sample" else "no_lapses",
  method = "label-certain",
  keep.update_history = TRUE,
  keep.exposure_data = FALSE,
  verbose = FALSE
)

update_NIW_ideal_adaptor_batch(
  prior,
  exposure,
  exposure.category = "category",
  exposure.cues = get_cue_labels_from_model(prior),
  noise_treatment = if (is.NIW_ideal_adaptor(prior)) {
     if
    (!is.null(first(prior$Sigma_noise))) 
         "marginalize"
     else "no_noise"
 }
    else "no_noise",
  verbose = FALSE
)

update_NIW_beliefs_incrementally(...)

Arguments

prior

An NIW_belief object, specifying the prior beliefs.

exposure

data.frame or tibble with exposure data. Each row is assumed to contain one observation.

exposure.category

Name of variable in data that contains the category information. (default: "category")

exposure.cues

Name(s) of variables in data that contain the cue information. By default these cue names are extracted from the prior object.

exposure.order

Name of variable in data that contains the order of the exposure data. If 'NULL' the exposure data is assumed to be in the order in which it should be presented.

noise_treatment

Determines whether and how multivariate Gaussian noise is considered during categorization. See update_NIW_belief_by_sufficient_statistics_of_one_category.

lapse_treatment

Determines whether attentional lapses can occur during which no updating occurs. See update_NIW_belief_by_sufficient_statistics_of_one_category.

method

Which updating method should be used? See update_NIW_belief_by_sufficient_statistics_of_one_category. The length of this argument should either be 1 (in which case it is recycled for each observation) or the same as the number of rows in expsure. (default: "label-certain").

keep.update_history

Should the history of the belief-updating be stored and returned? If so, the output is tibble with the one set of NIW beliefs for each exposure observation. This is useful, for example, if one wants to visualize the changes in the category parameters, posterior predictive, categorization function, or alike across time. (default: 'TRUE')

keep.exposure_data

Should the input data be included in the output? If 'FALSE' then only the category and cue columns will be kept. If 'TRUE' then all columns will be kept. (default: 'FALSE')

verbose

Should more informative output be provided?

Details

The priors for the categories are specified through the priors argument. This is expected to be a tibble of the same format as the posterior draws stored in an MV IBBU stanfit object. Each row of the tibble specifies the prior for one category (specified in the category column). The four parameters of the NIW are the pseudocounts indicating the strength of the prior beliefs into the mean (kappa) and covariance ( nu), as well as the prior mean of means (m, same as m_0 in Murphy, 2012) and the prior scatter matrix (S, same as S_0 in Murphy, 2012).

Value

An NIW_belief object.

References

\insertRef

murphy2012MVBeliefUpdatr

See Also

update_NIW_belief_by_one_observation, which is called by update_NIW_beliefs_incrementally


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