View source: R/compose-input-for-stan.R
compose_data_to_infer_NIW_ideal_adaptor | R Documentation |
Take exposure and test data as input, and prepare the data for input into an MVBeliefUpdatr Stan program.
compose_data_to_infer_NIW_ideal_adaptor(
exposure,
test,
cues,
category = "category",
response = "response",
group = "group",
group.unique = NULL,
center.observations = T,
scale.observations = T,
pca.observations = F,
pca.cutoff = 1,
lapse_rate = NULL,
mu_0 = NULL,
Sigma_0 = NULL,
tau_scale = 0,
L_omega_scale = 0,
use_univariate_updating = FALSE,
verbose = F
)
exposure |
'tibble' or 'data.frame' with the exposure data. Each row should be an observation of a category, and contain information about the category label, the cue values of the observation, and optionally grouping variables. |
test |
'tibble' or 'data.frame' with the test data. Each row should be an observation, and contain information about the cue values of the test stimulus and the participant's response. |
cues |
Names of columns with cue values. Must exist in both exposure and test data. |
category |
Name of column in exposure data that contains the category label. Can be |
response |
Name of column in test data that contains participants' responses. (default: "response") |
group |
Name of column that contains information about which observations form a group. Typically, this is a variable identifying subjects/participants. Must exist in both exposure and test data. (default: "group") |
group.unique |
Name of column that uniquely identifies each group with identical exposure. This could be a
variable indicating the different conditions in an experiment. Using group.unique is optional, but can be
substantially more efficient if many groups share the same exposure. To ignore, set to |
center.observations |
Should the data be centered based on cues' means during exposure? Note that the cues' means
used for centering are calculated after aggregating the data to all unique combinations specified by |
scale.observations |
Should the data be standardized based on cues' standard deviation during exposure? Note that the
cues' standard deviations used for scaling are calculated after aggregating the data to all unique combinations specified
by |
pca.observations |
Should the data be transformed into orthogonal principal components? (default: |
pca.cutoff |
Determines which principal components are handed to the MVBeliefUpdatr Stan program: all
components necessary to explain at least the pca.cutoff of the total variance. (default: .95) Ignored if
|
lapse_rate , mu_0 , Sigma_0 |
Optionally, lapse rate, prior expected category means ( |
tau_0_scales |
Optionally, a vector of scales for the Cauchy priors for each cue's standard deviations. Used in both the prior for m_0 and the prior for S_0. (default: vector of 5s of length of cues, assumes scaled input) |
omega_0_eta |
Optionally, etas the LKJ prior for the correlations of the covariance matrix of |
It is important to use group
to identify individuals that had a specific exposure (or no exposure at all)
and specific test trials. You should not use group
to identify exposure conditions. Setting group
to an exposure condition
results in an exposure that concatenates the exposure observations from all subjects in that condition. Typically, this
is not what users intend, as it models exposure to the combination of exposure tokens across all subjects, rather than
exposure to one set of those exposure tokens. To achieve this intended outcome, use
group.unique
to identify groups with identical exposure. This will correctly use only one unique instance of the
observations that any level of group
receives during exposure.
A list consisting of a data_list
and transform_information
. The former that is an
NIW_ideal_adaptor_input
.
is.NIW_ideal_adaptor_input
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.