Description Usage Arguments Details Examples
Estimate nondecision density
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
res |
an object of class |
tt |
optional timegrid if the nondecision density is to be estimated at a different grid than the model density. |
data |
if |
h |
Optional smoothing parameter to be used when estimating the nondecision model on a different time grid than the decision model. If omitted, the smoothing parameter of the decision model is used. |
zp |
Zero padding the estimated nondecision density by this amount to avoid numerical artefacts. |
upper.bound |
An upper bound for the nondecision density. Defaults to one. Lowering this bound can increase estimation speed, at the cost of assuming that the density of the nondecision distribution is zero past this value. |
lower.bound |
A lower bound for the nondecision density. Defaults to zero. Increasing this bound can increase estimation speed, at the cost of assuming that the density of the nondecision distribution is zero past this value. |
Optim |
a named list with identical arguments to |
verbose |
Numeric, should intermediate output be printed? Defaults to 1, higher values result in more progress output.
Estimation will speed up if set to 0. If nonzero, |
dist |
A matrix where columns represent nondecision distributions. If this argument is supplied then the objective function will be evaluated in these values. |
NDindex |
A vector containing indices of which nondecision distributions to estimate.
If omitted, all nondecision distributions that complement the results in |
max |
A positive float which indicates the maximum height of the nondecision distribution.
If estimated nondecision distributions appear chopped of or have a lot of values at this |
useRcpp |
Logical, setting this to true will make use of an Rcpp implementation of the objective function. This gains speed at the cost of flexibility. |
When verbose is set to 1, the ETA is an estimated of the time it takes to execute ALL iterations. Convergence can (and is usually) reached before then.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # simulate data with three stimuli of different difficulty.
# this implies different drift rates across conditions.
# define a time grid. A more reasonable stepsize is .01; this is just for speed.
tt = seq(0, 5, .1)
pars = c(.8, 2, .5, .5, .5, # condition 1
.8, 3, .5, .5, .5, # condition 2
.8, 4, .5, .5, .5) # condition 3
pdfND = dbeta(tt, 10, 30)
# simulate data
dat = simData(n = 3e5, pars = pars, tt = tt, pdfND = pdfND)
# define restriction matrix
restr = matrix(1:5, 5, 3)
restr[2, 2:3] = 6:7 # allow drift rates to differ
# fix variance parameters
fixed = matrix(c('sz1', .5, 'sv1', .5), 2, 2)
## Not run:
# Run D*M analysis
res = estDstarM(data = dat, tt = tt, restr = restr, fixed = fixed)
# Estimate nondecision density
resND = estND(res)
plot(resND)
lines(tt, pdfND, type = 'b', col = 2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.