Learn R Programming

calmr (version 0.7.0)

run_experiment: Run experiment

Description

Runs an experiment with minimal parameters.

Usage

run_experiment(x, outputs = NULL, parse = TRUE, aggregate = TRUE, ...)

Value

A CalmrExperiment with results.

Arguments

x

A CalmrExperiment or design data.frame

outputs

A character vector specifying which outputs to parse and aggregate. Defaults to NULL, in which case all model outputs are parsed/aggregated.

parse

A logical specifying whether the raw results should be parsed. Default = TRUE.

aggregate

A logical specifying whether the parsed results should be aggregated. Default = TRUE.

...

Arguments passed to other functions

Examples

Run this code
# Using a data.frame only (throws warning)
df <- get_design("relative_validity")
run_experiment(df, model = "RW1972")

# Using custom parameters
df <- get_design("relative_validity")
pars <- get_parameters(df, model = "HD2022")
pars$alphas["US"] <- 0.6
run_experiment(df, parameters = pars, model = "HD2022")

# Using make_experiment, for more iterations
df <- get_design("blocking")
pars <- get_parameters(df, model = "SM2007")
exper <- make_experiment(df,
  parameters = pars, model = "SM2007",
  iterations = 4
)
run_experiment(exper)

# Only parsing the associations in the model, without aggregation
run_experiment(exper, outputs = "associations", aggregate = FALSE)

Run the code above in your browser using DataLab