Without ndt_group() this is frm_linpred(fit, dpar = "ndt", type = "response"), which already reports a time. With ndt_group() the
ndt link is a plain logit on a FRACTION of the row's own bound, so
predict() reports that fraction and this multiplies it back out.
Written so that a caller need not know which of the two a fit is.
Arguments
- object
A fitted
wiener(),lba(),rdm()orwiener_gng()model, or a fit from another package whose family carries a bound fromndt_bound_attach().- newdata
Optional data frame. It must carry the model's
ndt_group()column when the model has one.- ...
Passed to
stats::predict();re_formulaandallow_new_levelsare the useful ones.
Details
The bound is the fastest response of the row's ndt_group(), or of
the whole data set when the model has no ndt_group(), or the
max_ndt the family was given. Whichever it is, it is a property of
the data the model was FITTED to, so a prediction on new rows is
scaled by the same bound the fit used.
It reads the bound record rather than the family's name, so a fit
from ANOTHER package whose family carries a bound through
ndt_bound_attach() is reported here too, and
frmtmb.learn::rlddm() is the first of those.
See also
wiener() for what the two parameterizations are and why
there are two, ndt_bound() for the seam another package's family
reaches them through.
Examples
set.seed(1)
d <- ddm_simulate(300, mu = 1.2, bs = 1.5, ndt = 0.25)
fit <- frm(bf(rt | dec(upper) ~ 1, bs ~ 1, ndt ~ 1, bias = 0.5),
family = wiener(), data = d)
# with no ndt_group() the two agree: `ndt` is already a time
head(frmtmb::frm_linpred(fit, dpar = "ndt", type = "response"), 3)
#> 1 2 3
#> 0.2569868 0.2569868 0.2569868
head(ndt_time(fit), 3)
#> [1] 0.2569868 0.2569868 0.2569868