Implements the biexponential refractory model (BERM) using maximum likelihood estimation
to fit parameters for inter-response times (IRTs) within and between bouts.
The model is defined as:
$$p(IRT = \tau | \tau \ge \delta) = p w e^{-w (\tau - \delta)} + (1 - p) b e^{-b (\tau - \delta)}$$
where \(w\) and \(b\) are the rates for within and between bouts, \(p\) is the proportion of responses in bouts,
and \(\delta\) is the refractory period.
Calculates the negative log-likelihood for the BERM model.
Maps an unconstrained d_hat onto the observed minimum inter-response time (d), ensuring
that it aligns with model constraints.
Converts raw parameters into their constrained forms to enforce model constraints on
parameters such as w, l0, l1, and d.
Optimizes the log-likelihood function to estimate BERM model parameters based on
observed inter-response times.