ind_trials_obj_fun {YEAB}R Documentation

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)

Arguments

params

A vector of parameters to be optimized.

r_times

Vector of response times

trial_duration

Duration of the trial

Value

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


[Package YEAB version 1.0.6 Index]