get_categorization_function: Get categorization function from a model object

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

get_categorization_functionR Documentation

Get categorization function from a model object

Description

Returns a categorization function that can be used to categorize a set of cues into categories.

Usage

get_categorization_function(x, ...)

## S3 method for class 'ideal_adaptor_stanfit'
get_categorization_function(
  x,
  lapse_treatment = c("no_lapses", "sample", "marginalize")[3],
  groups = get_group_levels(x, include_prior = TRUE),
  ...
)

Arguments

x

A model object. Currently, only ideal_adaptor_stanfit objects are supported.

...

Optionally, additional arguments handed to get_draws.

lapse_treatment

Should the consequences of attentional lapses be included in the categorization function ("marginalize") or not ("no_lapses")? (default: "marginalize")

Value

A function that takes as input cue values and returns posterior probabilities of the first category, based on the posterior predictive of the cues given the ideal adaptor categories' parameters. The function will accept the following arguments:

  • 'target_category':The index of the category for which categorization should be shown. (default: '1')

  • 'logit':Should the function return log-odds (TRUE) or probabilities (FALSE)? (default: FALSE)


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