calc_log_like | R Documentation |
Wrapper function around log_like_heart
calc_log_like(pdfs, t_vec, obs_data, conds)
log_like_heart(pdf_u, pdf_l, t_vec, rts_u, rts_l)
pdfs |
a list of pdfs (see details) |
t_vec |
time space |
obs_data |
a list of obs_data |
conds |
all conditions of a model |
pdf_u , pdf_l |
numeric vectors of the pdfs (unpacked) |
rts_u , rts_l |
numeric vectors of the observed RTs (unpacked) |
Iterates over all conditions, and passes forward the (unpacked) arguments
to log_like_heart
, adding each log-likelihood of a condition.
pdfs
must be a list with entries named as the conditions, and then
each condition being a list of the two PDFs (named pdf_u and pdf_l)
obs_data
must be a list with entries "rts_u" and "rts_l", and then
each rts_* entry being a named list with the RT values for each condition
Gets the density values for RTs in rts_u/rts_l via stats::approx()
,
takes the log of that, and then sums across both.
Wraps up the calculation in a tryCatch statement, throwing warnings when
log_like_values can not be calculated
a single value of the log-likelihood
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.