get_original_variable_levels_from_stanfit: Get or restore the original group or category levels from an...

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

get_original_variable_levels_from_stanfitR Documentation

Get or restore the original group or category levels from an NIW ideal adaptor stanfit.

Description

Checks if information is available about the original values and order of the factor levels for the category variable (for which beliefs about means and covariances are inferred) or group variable (e.g., subject or exposure group), respectively. If available, that information is returned. 'get_category_levels_from_stanfit()' and 'get_group_levels_from_stanfit()' are convenience functions, calling 'get_original_variable_levels_from_stanfit()'.

Usage

get_original_variable_levels_from_stanfit(
  fit,
  variable = c("category", "group", "cue"),
  indices = NULL
)

get_category_levels_from_stanfit(fit, indices = NULL)

get_group_levels_from_stanfit(fit, indices = NULL, include_prior = F)

get_cue_levels_from_stanfit(fit, indices = NULL)

Arguments

fit

NIW_ideal_adaptor_stanfit object.

variable

Either "category" or "group".

indeces

A vector of category or group indices that should be turned into the original category levels, or 'NULL' if only the unique levels in their original order (as vector of characters) should be returned. (default: 'NULL')

Value

If no category or group indices are provided, the levels of the category/group are returned (in the original order). Otherwise a vector of the same length as indices

See Also

recover_types from tidybayes, get_constructor


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