Learn R Programming

YEAB (version 1.0.6)

ind_trials_obj_fun: Objective function for finding the best fit for individual trials

Description

This function is used by optim to find the best fit for individual trials by minimizing the sum of areas between the response rate and the target rate. Do not call this function directly.

Usage

ind_trials_obj_fun(params, r_times, trial_duration)

Value

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

Arguments

params

A vector of parameters to be optimized.

r_times

Vector of response times

trial_duration

Duration of the trial