make_experiment {calmr}R Documentation

Make CalmrExperiment

Description

Makes a CalmrExperiment object containing the arguments necessary to run an experiment.

Usage

make_experiment(
  design,
  parameters = NULL,
  model = NULL,
  iterations = 1,
  miniblocks = TRUE,
  .callback_fn = NULL,
  ...
)

Arguments

design

A design data.frame.

parameters

Parameters for a model as returned by get_parameters().

model

A string specifying the model name. One of supported_models().

iterations

An integer specifying the number of iterations per group.

miniblocks

Whether to organize trials in miniblocks.

.callback_fn

A function for keeping track of progress. Internal use.

...

Extra parameters passed to other functions.

Value

A CalmrExperiment object.

Note

The miniblocks option will direct the sampling function to create equally-sized miniblocks with random trials within a phase. For example, the phase string "2A/2B" will create two miniblocks with one of each trial. The phase string "2A/4B" will create two miniblocks with one A trial, and 2 B trials. However, the phase string "2A/1B" will not result in miniblocks, even if miniblocks here is set to TRUE.

See Also

parse_design(),

Examples

des <- data.frame(Group = "G1", P1 = "10A>(US)", R1 = TRUE)
ps <- get_parameters(des, model = "HD2022")
make_experiment(
  design = des, parameters = ps,
  model = "HD2022", iterations = 2
)

[Package calmr version 0.6.1 Index]