prepare_data_incremental_suff_stats: Convert data into format for incremental updating with...

Description Usage Arguments Details Value

View source: R/stan-conj-update.R

Description

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.

Usage

1
2
prepare_data_incremental_suff_stats(df, cue, category, response, condition,
  ranefs, n_blocks, test_df = df)

Arguments

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).

Details

For now, the total number of trials in training and test need to be equal.

Value

A list of data for 'conj_id_lapsing_sufficient_stats_fit.stan'.


kleinschmidt/beliefupdatr documentation built on May 24, 2020, 8:26 p.m.