Description Usage Arguments Details Examples
bwdm
creates parameter estimates for the four parameters
of the Wiener diffusion model.
1 2 |
data |
is the data object containing data coming from a (hypothetical) Wiener Diffusion process. For further details on the data object, see is.wiener. |
yvar |
represents an optional vector, that can be used to define the names of the reaction time column. For further details on the data object, see is.wiener. |
alpha |
optional, can be used to fix the alpha parameter to the given value. |
tau |
optional, can be used to fix the tau parameter to the given value. |
beta |
optional, can be used to fix the beta parameter to the given value. |
delta |
optional, can be used to fix the delta parameter to the given value. |
xvar |
optional: group factor variable to estimate all unfixed parameters separate for the given groups. |
start |
an optional vector with the four starting parameter values in the following order: alpha, tau, beta, delta. |
fixed |
a number indicating how many of the parameters are fixed (not free). This number will be subtracted from the number of free parameters. Defaults to 0. |
jagscmd |
a list with options for the jags call. Defaults to
|
idvar |
variable/factor name defining the individual/person in data
in data (typically column name in data.frame), defaults to |
The bwdm
function calls an mcmc based estimation
routine (JAGS with the JAGS Wiener module),
to estimate the model parameters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## 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"))
## fit wdm
bwdm1 <- bwdm(dat)
## extract parameters
coef(bwdm1)
## further models
bwdm2 <- bwdm(dat, beta=.5)
bwdm3 <- bwdm(dat, alpha=bwdm1$coefficients["alpha"],
tau=bwdm1$coefficients["tau"],
beta=bwdm1$coefficients["beta"],
xvar="group")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.