monoexp_model: Monoexponential model with gradient

View source: R/analyse_monoexponential.R

monoexp_modelR Documentation

Monoexponential model with gradient

Description

Model function of SSmonoexponential(): monoexponential() plus the partial derivatives for the parameters written as bare symbols in the call (see free_params()), so stats::nls() skips stats::numericDeriv() and a parameter fixed as a constant in the formula contributes no gradient column.

Usage

monoexp_model(t, A, B, tau, TD = NULL)

Arguments

t

A numeric vector of the predictor variable (time).

A

A numeric parameter for the starting baseline of the response variable.

B

A numeric parameter for the ending asymptote of the response variable.

tau

A numeric parameter for the time constant (\tau) of the exponential response, in units of the predictor variable t.

TD

A numeric parameter for the time delay before the onset of the exponential response, in units of the predictor variable t. If NULL (default), a 3-parameter model without time delay is used.

Value

A numeric vector of predicted values with a "gradient" attribute when any parameter is free.


mnirs documentation built on Sept. 13, 2026, 1:06 a.m.