Learn R Programming

EMC2 (version 3.1.0)

sampled_pars: Get Model Parameters from a Design

Description

Makes a vector with zeroes, with names and length corresponding to the model parameters of the design.

Usage

sampled_pars(
  x,
  model = NULL,
  doMap = TRUE,
  add_da = FALSE,
  all_cells_dm = FALSE
)

# S3 method for emc.design sampled_pars( x, model = NULL, doMap = TRUE, add_da = FALSE, all_cells_dm = FALSE )

# S3 method for emc.prior sampled_pars( x, model = NULL, doMap = TRUE, add_da = FALSE, all_cells_dm = FALSE )

# S3 method for emc sampled_pars( x, model = NULL, doMap = TRUE, add_da = FALSE, all_cells_dm = FALSE )

Value

Named vector.

Arguments

x

an emc.design object made with design() or an emc object.

model

a model list. Defaults to the model specified in the design list.

doMap

logical. If TRUE will also include an attribute map with the design matrices that perform the mapping back to the design

add_da

Boolean. Whether to include the relevant data columns in the map attribute

all_cells_dm

Boolean. Whether to include all levels of a factor in the mapping attribute, even when one is dropped in the design

Examples

Run this code
# First define a design
design_DDMaE <- design(data = forstmann,model=DDM,
                           formula =list(v~0+S,a~E, t0~1, s~1, Z~1, sv~1, SZ~1),
                           constants=c(s=log(1)))
# Then for this design get which cognitive model parameters are sampled:
sampled_pars(design_DDMaE)

Run the code above in your browser using DataLab