View source: R/distributions.R
| diffusion_lpdf | R Documentation |
Log-likelihood for a two-boundary drift diffusion model. The first argument is the response time and the second argument is the binary response. Positive response values are treated as upper-boundary responses; zero or negative values are treated as lower-boundary responses.
If x is a matrix, rows are treated as independent units and columns as
repeated trials. In that case, sum = FALSE returns one log-likelihood
contribution per row. If x is a vector, sum = FALSE returns one
contribution per observation.
diffusion_lpdf(x, response, alpha, tau, beta, delta, K_diff = 20, sum = TRUE)
x |
Response times. A vector, or a matrix with units in rows and trials in columns. |
response |
Binary responses with the same shape as |
alpha |
Boundary separation. A scalar, row-wise vector, trial-wise vector, or matrix compatible with |
tau |
Non-decision time. A scalar, row-wise vector, trial-wise vector, or matrix compatible with |
beta |
Initial bias as a proportion of the boundary separation. A scalar, row-wise vector, trial-wise vector, or matrix compatible with |
delta |
Drift rate. A scalar, row-wise vector, trial-wise vector, or matrix compatible with |
K_diff |
Number of terms in the truncated infinite-series approximation. |
sum |
Logical; if |
The summed log-likelihood, row-wise log-likelihoods for matrix input, or observation-wise log-likelihoods for vector input.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.