get_posterior_from_model: Get posterior from model

View source: R/get-info-from-model.R

get_posterior_from_MVG_ideal_observerR Documentation

Get posterior from model

Description

Categorize a single observation based a model. The decision rule can be specified to be either the criterion choice rule, proportional matching (Luce's choice rule), or the sampling-based interpretation of Luce's choice rule.

Usage

get_posterior_from_MVG_ideal_observer(
  x,
  model,
  noise_treatment = if (decision_rule == "sampling") "sample" else "marginalize",
  lapse_treatment = if (decision_rule == "sampling") "sample" else "marginalize"
)

get_posterior_from_model(model, ...)

Arguments

x

A vector of observations.

model

A model object.

noise_treatment

Determines whether and how multivariate Gaussian noise is added to the input. See get_MVG_likelihood. (default: "sample" if decision_rule is "sample"; "marginalize" otherwise).

lapse_treatment

Determines whether and how lapses will be treated. Can be "no_lapses", "sample" or "marginalize". If "sample", whether a trial is lapsing or not will be sampled for each observations. If a trial is sampled to be a lapsing trial the lapse biases are used as the posterior for that trial. If "marginalize", the posterior probability will be adjusted based on the lapse formula lapse_rate * lapse_bias + (1 - lapse_rate) * posterior probability from perceptual model. (default: "sample" if decision_rule is "sample"; "marginalize" otherwise).

Value

A tibble of observations with posterior probabilities for each category (in long format).

See Also

TBD


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