compare_block_diffs: Compare learning parameters between groups over different...

View source: R/compare_block_diffs.R

compare_block_diffsR Documentation

Compare learning parameters between groups over different numbers of training blocks

Description

Compare learning parameters between groups over different numbers of training blocks

Usage

compare_block_diffs(
  all_res,
  var_of_interest,
  covariates,
  model,
  vb = TRUE,
  fit_together = vb,
  out_dir = "outputs/cmdstan/compare_blocks",
  iter_warmup_glm = 2000,
  iter_sampling_glm = 4000,
  min_blocks = 1,
  max_blocks = 6,
  save_mod_out = FALSE,
  ...
)

Arguments

all_res

List output from import_multiple(), split by variable of interest.

var_of_interest, covariates

Same as parameter_glm().

model, vb, out_dir

Same as fit_learning_model().

fit_together

Whether or not to fit all participant data to the model at the same time, or by group (if FALSE). Recommended for variational fits.

iter_warmup_glm, iter_sampling_glm

Number of warm-up and sampling iterations to fit Bayesian GLMs with (passed to parameter_glm()).

min_blocks, max_blocks

Minimum and maximum number of blocks to fit models on. For example, if min_blocks is set to 3 and max_blocks is set to 4, then fits to blocks 1 to 3 and 1 to 4 will be outputted.

save_mod_out

Save model summaries and raw data separately?

...

Other arguments to pass to fit_learning_model() and/or parameter_glm().

Value

A data frame with parameter values for each of the fits.

Examples

## Not run: 
data(example_data)
dir.create("outputs/cmdstan/compare_blocks")

comp_blocks <- compare_block_diffs(
  example_data,
  var_of_interest = "distanced",
  covariates = c("age", "sex", "digit_span"),
  model = "2a"
)

## End(Not run)


qdercon/pstpipeline documentation built on June 1, 2025, 1:11 p.m.