get_categorization_from_model: Get categorization from model

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

get_categorization_from_MVG_ideal_observerR Documentation

Get categorization 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_categorization_from_MVG_ideal_observer(
  x,
  model,
  decision_rule = "sampling",
  noise_treatment = if (decision_rule == "sampling") "sample" else
    infer_default_noise_treatment(model$Sigma_noise),
  lapse_treatment = if (decision_rule == "sampling") "sample" else "marginalize",
  simplify = F
)

get_categorization_from_model(model, decision_rule = "sampling", ...)

Arguments

x

A vector of observations.

model

A model object.

decision_rule

Must be one of "criterion", "proportional", or "sampling". (default: "sampling")

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).

simplify

Should the output be simplified, and just the label of the selected category be returned? This option is only available for the criterion and sampling decision rules. (default: 'FALSE')

Value

Either a tibble of observations with posterior probabilities for each category (in long format), or a character vector indicating the chosen category in the same order as the observations in x (if simplify = 'TRUE').

See Also

TBD


hlplab/MVBeliefUpdatr documentation built on July 5, 2025, 6:42 a.m.