Description Usage Arguments Details Value
View source: R/stan-conj-update.R
Approximates true incremental updating by breaking data into blocks of equal numbers of trials, and then using training data from previous n-0.5 blocks to update beliefs for test data from block n. Further, uses the _overall_ sufficient statistics in each group, just adjusting the number of _trials_ in each block. This is because (in the dataset this was originally developed for), the trial order was different for each subject and so when fitting aggregate data it makes sense to use the aggregate statistics.
1 2 | prepare_data_incremental_suff_stats(df, cue, category, response, condition,
ranefs, n_blocks, test_df = df)
|
df |
Data frame with adaptation data |
cue |
(Quoted) name of columns in training and test which have the cue values. |
category |
(Quoted) name of column in training data with the correct category labels. |
response |
(Quoted) name of column in test data with responses |
condition |
(Quoted) name of column with group identifiers |
ranefs |
(Quoted) name of column(s) with random effect grouping variables (like subject IDs). |
n_blocks |
Number of blocks to divide data into. |
test_df |
(optional) data frame with test data (all data is used as test by default). |
For now, the total number of trials in training and test need to be equal.
A list of data for 'conj_id_lapsing_sufficient_stats_fit.stan'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.