offsetErrorDecayMSE: Get the MSE between offset exponential decay and a time...

View source: R/models.R

offsetErrorDecayMSER Documentation

Get the MSE between offset exponential decay and a time series

Description

This function is part of a set of functions to fit and evaluate an offset exponential decay function to a time series.

Usage

offsetErrorDecayMSE(par, signal, timepoints = c(0:(length(signal) - 1)))

Arguments

par

A named numeric vector with the model parameters (see details).

signal

A numeric vector of length N with reach deviations matching the perturbation schedule.

timepoints

Either an integer with the number of trials (N) or a vector with N trial numbers (this can have missing values or fractions). The exponential will be evaluated at those timepoints.

Details

The 'par' argument is a named numeric vector that should have the following elements: - r: rate (of decay/learning) - s: span (difference between starting point and asymptote) - o: offset (added to the whole function)

Value

A float: the mean squared error between the total model output and the time series.


thartbm/handlocs documentation built on Feb. 18, 2025, 10:53 p.m.