twoRateMSE: Get the MSE for how well the two-rate model fits reaches.

View source: R/twoRateModel.R

twoRateMSER Documentation

Get the MSE for how well the two-rate model fits reaches.

Description

This function is part of a set of functions to fit and evaluate the two-rate model of motor learning.

Usage

twoRateMSE(par, schedule, reaches, checkStability = FALSE)

Arguments

par

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

schedule

A numeric vector of length N with the perturbation schedule.

reaches

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

checkStability

Only stable solutions will be permitted.

Details

The 'par' argument is a named numeric vector that should have the following elements: - Ls: the slow learning rate - Lf: the fast learning rate - Rs: the slow retention rate - Rf: the fast retention rate

Value

A float: the mean squared error between the total model output and the reach deviations.

Examples

?

thartbm/SMCL documentation built on Oct. 23, 2022, 5:17 a.m.