modelObjectiveFunction {pdmod} | R Documentation |
Objective function to fit model parameters
Description
Function passed to optimization routine to minimize to
estimate parameters. Uses mean squared error to calculate
difference between dataResponse
and what
computeModel
) would forcast for
dataX
using parameters pars
.
Usage
modelObjectiveFunction(pars, dimension, dataX,
dataResponse, responseFunction = calculateResponse,
sessionBoundaries = NA, fitG = TRUE)
Arguments
pars |
Vector of parameters mFast, mSlow, n, hSlow, and r |
dimension |
What dimension to return error in, 1 for single criteria optimization, or number of columns of data for multicriteria optimization |
dataX |
List of observations of process x(i) (with real time) |
dataResponse |
Corresponding list of observations of subject's response to x(i), i.e. ~x(i) |
responseFunction |
The function to use to transform the forecast into a response |
sessionBoundaries |
(option) Vector defining how to
group the trials into sessions where the items are the
starting indicies for each session (so the last value can
be the index after the last trial) and |
fitG |
|
Value
Error between dataRespones
and what would have
been estimated for dataX
based on parameters pars
Author(s)
Chloe Bracis