modelObjectiveFunction: Objective function to fit model parameters

Description Usage Arguments Value Author(s) See Also

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

1
2
3
  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 NAs are used for gaps between sessions

fitG

TRUE to estimate g, or FALSE to fix g at 0

Value

Error between dataRespones and what would have been estimated for dataX based on parameters pars

Author(s)

Chloe Bracis

See Also

computeModel, fitModel


pdmod documentation built on May 2, 2019, 5:16 a.m.