rsc {spdesign}R Documentation

Make a design candidate based on the rsc algorithm

Description

Depending on the setting the function calls a combination of relabel, swap and cycle to create new design candidates. The code is intentionally written modular to allow for all special cases of the algorithm.

Usage

rsc(
  design_object,
  model,
  efficiency_criteria,
  utility,
  prior_values,
  dudx,
  candidate_set,
  rows,
  control
)

Arguments

design_object

A list of class 'spdesign' created within the generate_design function

model

A character string indicating the model to optimize the design for. Currently the only model programmed is the 'mnl' model and this is also set as the default.

efficiency_criteria

A character string giving the efficiency criteria to optimize for. One of 'a-error', 'c-error', 'd-error' or 's-error'. No default is set and argument must be specified. Optimizing for multiple criteria is not yet implemented and will result in an error.

utility

A named list of utility functions. See the examples and the vignette for examples of how to define these correctly for different types of experimental designs.

prior_values

A list of priors

dudx

A character string giving the name of the prior in the denominator. Must be specified when optimizing for 'c-error'

candidate_set

A matrix or data frame in the "wide" format containing all permitted combinations of attributes. The default is NULL. If no candidate set is provided, then the full factorial subject to specified exclusions will be used. This is passed in as an object and not a character string. The candidate set will be expanded to include zero columns to consider alternative specific attributes.

rows

An integer giving the number of rows in the final design

control

A list of control options


[Package spdesign version 0.0.4 Index]