Learn R Programming

calmr (version 0.7.0)

make_experiment: Make CalmrExperiment

Description

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

Usage

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

Value

A CalmrExperiment object.

Arguments

design

A design data.frame.

model

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

parameters

Optional. Parameters for a model as returned by get_parameters().

timings

Optional. Timings for a time-based design as returned by get_timings()

iterations

An integer specifying the number of iterations per group. Default = 1.

miniblocks

Whether to organize trials in miniblocks. Default = TRUE.

seed

A valid seed for the RNG to make the experiment. Default = NULL, in which case the current RNG is used.

.callback_fn

A function for keeping track of progress. Internal use.

...

Extra parameters passed to other functions.

See Also

parse_design(),

Examples

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

Run the code above in your browser using DataLab