make_stan_model: Creates the SDT stan model code.

Description Usage Arguments Value Examples

View source: R/make_stan_model.R

Description

make_stan_model function creates the stan model code defining the SDT model with additional regression structure and random effects if these are specified using the random argument. See make_stan_data for details on how to specify a random effects structure. The model is described in detail in the paper (TODO reference)

Usage

1
2
3
4
5
6
make_stan_model(
  random = NULL,
  gamma_link = "softmax",
  model = "sdt",
  delta_link = "log"
)

Arguments

random

an optional list specifying random effects structure. See make_stan_data for details.

gamma_link

can be either 'softmax' (described in the paper), 'log_distance', or 'log_ratio' (See the Readme file in the github repository)

model

can be either 'sdt' (the default), 'uvsdt', 'metad', 'ordinal', or 'uvordinal'

Value

a string containing the full model definition in the stan modelling language.

Examples

1
2
3
data(gabor)
model = make_stan_model(list(list(group = ~ id, delta = ~ -1 + duration, gamma = ~ 1)))
cat(model)

boryspaulewicz/bhsdtr documentation built on March 8, 2020, 8:24 a.m.