sample_data: Sample data from model.

sample_data_from_modelR Documentation

Sample data from model.

Description

Returns a tibble of observations drawn from one of the models defined in MVBeliefUpdatr, with one observation per row. Each row provides the category label and cue values. Lapse rate and lapse bias are currently not considered while sampling.

Usage

sample_data_from_model(model, Ns, randomize.order = T)

sample_MVG_data(
  Ns,
  mus,
  Sigmas,
  category.labels = NULL,
  cue.labels = NULL,
  randomize.order = T
)

sample_NIW_data(
  Ns,
  ms,
  Ss,
  kappas,
  nus,
  category.labels = NULL,
  cue.labels = NULL,
  randomize.order = T
)

sample_exemplar_data(
  Ns,
  category.labels = NULL,
  cue.labels = NULL,
  randomize.order = T
)

Arguments

model

MVG, MVG_ideal_observer, NIW_belief, or NIW_ideal_adaptor object.

Ns

Integer vector, with each number specifying the number of observations to be drawn from the corresponding Gaussian.

randomize.order

Should the order of the data be randomized? If not, samples are sorted by category (default: TRUE)

mus, sigmas, nus

etc. Lists of parameters with the n-th element of each list specifying relevant parameter necessary to characterize the model's representations of the n-th category.

category.labels

Character vector of category names, each specifying the category label of a multivariate Gaussian. (default: extracted from model if available, otherwise 1:N)

cue.labels

Character vector of cue names. If NULL (default) then the cues will be numbered cue1, cue2, ... (default: extracted from model if available, otherwise cue1, cue2, ...)

Value

A tibble.

See Also

TBD


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