objective_bp {YEAB}R Documentation

Objective function for the breakpoint optimization algorithm

Description

Objective function for the breakpoint optimization algorithm for fixed interval trials. This function is used by optim to find the optimal breakpoint. Do not call this function directly.

Usage

objective_bp(param, r_times, trial_duration)

Arguments

param

A numeric value of the breakpoint

r_times

A numeric vector of response times

trial_duration

A numeric value of the trial duration

Value

A numeric value representing the sum of areas between the response rate and the target rate.


[Package YEAB version 1.0.6 Index]