Learn R Programming

ggdmc (version 0.1.3.9)

model.dmc: Creating a Model Object

Description

model.dmc Creates an array object ("model") with a set of attributes specifying a particular model and parameterisation. Call coda to summarise the model parameters in a DMC samples with multiple participants at the hyper level.

Usage

model.dmc(p.map, factors = list(S = c("s1", "s2")), responses = c("r1",
  "r2"), match.map = list(M = list(s1 = 1, s2 = 2)), constants = numeric(0),
  type = "norm", posdrift = TRUE, verbose = TRUE)

Arguments

p.map
list factors and constants for parameters
factors
Factor names and levels
responses
Response (accumulator) names
match.map
Scores responses
constants
Parameters set to constant value
type
model type. Should go to class in the future
posdrift
only used by norm (ie LBA model)
verbose
Print p.vector, constants and type

Details

model.dmc creates a matrix used by get.par.mat to arrange elements of a parameter vector appropriately. The attributes of output used by get.par.mat to add in constants and check transform.par creates the right parameters.

Examples

Run this code
m1 <- model.dmc(
   p.map     = list(a="1",v="F",z="1",d="1",sz="1",sv="1",t0="1",st0="1"),
   match.map = list(M=list(s1="r1",s2="r2")),
   factors=list(S=c("s1","s2"), F=c("f1","f2")),
   constants = c(st0=0,d=0),
   responses = c("r1","r2"),
   type = "rd")

Run the code above in your browser using DataLab