R/RcppExports.R

Defines functions twoRateReachModel twoRateReachModelErrors

Documented in twoRateReachModel twoRateReachModelErrors

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @title Evaluate the Two-Rate Model.
#' @param par A list of named parameters.
#' @param schedule A sequence of feedback manipulations
#' @return A dataframe with three columns, the states of the \code{fast} and \code{slow} process and the \code{total} model output. Each row has the states and output for every trial in the rotation schedule.
#' @description Evaluate the Two-Rate Model Given Parameters and a Perturbation Schedule.
#' @seealso \code{\link{fitTwoRateReachModel}} and \code{\link{twoRateReachModelErrors}}
#' @export
twoRateReachModel <- function(par, schedule) {
    .Call(`_RateRate_twoRateReachModel`, par, schedule)
}

#' @title Return the Mean Squared Error Between a Two-Rate Model and a Dataset.
#' @param par (NumericVector) named parameters (Ls, Rs, Lf, Rf).
#' @param reaches (NumericVector) N reach deviations.
#' @param schedule (NumericVector) N feedback manipulations.
#' @param checkStability (bool) constrain the model to stable parameters.
#' @return The average squared error of the model's prediction of the reach deviations given the rotation schedule and model parameters.
#' @description Calculates the average squared error of the Two-Rate Model's prediction, given a set of parameters and a rotation schedule.
#' @seealso \code{\link{fitTwoRateReachModel}} and \code{\link{twoRateReachModel}}
#' @export
twoRateReachModelErrors <- function(par, reaches, schedule, checkStability = TRUE) {
    .Call(`_RateRate_twoRateReachModelErrors`, par, reaches, schedule, checkStability)
}
thartbm/RateRate documentation built on May 17, 2019, 11:16 p.m.