hwdm: Hierarchical Bayesian Wiener diffusion model fit functions

Description Usage Arguments Details Examples

View source: R/hwdm.R

Description

hwdm creates parameter estimates for the parameters of the underlying hierarchical Wiener diffusion model used.

Usage

1
  hwdm(data, jagscmd=NULL, model="hwdm", idvar="id", condvar=NULL)

Arguments

data

is the data object containing data coming from a (hypothetical) Wiener Diffusion process. For further details on the data object, see is.wiener.

jagscmd

a list with options for the jags call. Defaults to NULL which is equal to: list(n.chains=1, n.adapt=1000, n.iter=10000, thin=10).

model

the model to use. Options are the following: hwdm for a simple hierarchical extension to the standard model, with a normal distribution assumed for the delta parameter and a uniform distribution for the remaining 3 parameters; wdmhd for a hierarchical extension only on the delta parameter by assuming that this parameter stems from a normal distribution; wdmhdc same as the wdmhd extension, but allowing for different means of the delta parameter depending on groups/conditions; rdm provides a hierarchical extension in the form of the Ratcliff diffusion model with 7 parameters: alpha, mDelta, sDelta, mBeta, uBeta, mTau, uTau.

idvar

variable/factor name defining the individual/person in data in data (typically column name in data.frame), defaults to id.

condvar

variable/factor name defining the condition in data (typically column name in data.frame), if necessary for model.

Details

The hwdm function calls an mcmc based estimation routine (JAGS with the JAGS Wiener module), to estimate the model parameters of the specified model.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
## generate random data
dat <- rbind(cbind(rwiener(100, 2,.3,.5,1), group="A"),
        cbind(rwiener(100,2,.3,.5,-1), group="B"))

## hierarchical models
hwdm1 <- hwdm(dat, model="hwdm")
wdmhd1 <- hwdm(dat, model="wdmhd")

## End(Not run)

yeagle/BWiener documentation built on May 4, 2019, 2:32 p.m.