BuildModel: Create a model object

Description Usage Arguments Examples

View source: R/model.R

Description

Create a model array and attach many model attributes. These attributes specify a particular model and parameterisation.

Usage

1
2
3
4
5
6
7
BuildModel(p.map, responses, factors = list(dummy = "1"),
  match.map = NULL, constants = numeric(0), type = "norm",
  posdrift = TRUE, verbose = TRUE, cvs = NULL, responses2 = NULL,
  constant_prior = NULL)

## S3 method for class 'model'
print(x, p.vector = NULL, ...)

Arguments

p.map

mapping factorial design to model parameters

responses

Response (accumulator) names

factors

specifying factors and factor levels

match.map

matching stimuli and responses

constants

setting parameters as constant value

type

using character string to specifying model type.

posdrift

enforce postive drift rate, using truncated normal or just using normal distribution. This is used only by norm type (any LBA variants and extensions)

verbose

Print parameter vector, constants and model type

cvs

Names of trial covariates (in data). A redundant argument.

responses2

Second response name (multi-threshold models)

constant_prior

Parameter sampled from a fixed prior

x

a model object

p.vector

parameter vector (for printing model)

...

other arguments

Examples

1
2
3
4
5
6
7
8
model <- BuildModel(
        p.map     = list(a = "1", v = "1", z = "1", d = "1", t0 = "1", sv = "1",
                         sz = "1", st0 = "1"),
        constants = c(st0 = 0, d = 0, sz = 0, sv = 0),
        match.map = list(M = list(s1 = "r1", s2 = "r2")),
        factors   = list(S = c("s1", "s2")),
        responses = c("r1", "r2"),
        type      = "rd")

ggdmc documentation built on Sept. 2, 2018, 1:03 a.m.