infer_prior_beliefs: Infer prior beliefs based on adaptation behavior

Description Usage Arguments Value See Also

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

Description

This takes training and test data, the names of the columns, and (optionally) the number of blocks to split the trials into, and stan parameters, and uses stan to draw samples from the prior beliefs that match the behavior.

Usage

1
2
infer_prior_beliefs(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).

...

Additional parameters are passed to sampling

Value

A stanfit object with the fitted stan model.

See Also

extract_prior_samples to get a data frame of samples from the prior belief parameters.


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