View source: R/analyse_exponential_drift.R
| analyse_exponential_drift | R Documentation |
Internal channel-level dispatch for
analyse_kinetics(method = "exponential_drift"). Fits a two-phase
monoexponential + linear-drift curve to each nirs_channel within a
single "mnirs" data frame via fit_exponential_drift(), falling
back to fit_monoexponential() where the drift is unsupported (see
kinetics_fallbacks). See analyse_kinetics() for user-facing
documentation.
analyse_exponential_drift(
data,
nirs_channels = NULL,
time_channel = NULL,
use_TD = TRUE,
drift_fraction = 0.95,
fix = NULL,
control = NULL,
start_time = NULL,
direction = c("auto", "positive", "negative"),
end_window = Inf,
verbose = TRUE,
...,
env = rlang::caller_env()
)
data |
A data frame of class "mnirs" containing time series data and metadata. |
nirs_channels |
A character vector giving the names of mNIRS columns to
operate on. Must match column names in
|
time_channel |
A character string naming the time or sample column.
Must match a column name in
|
use_TD |
Logical; default is |
drift_fraction |
A numeric fraction of the amplitude in |
fix |
An optional named list of model parameters ( |
control |
An optional |
start_time |
A numeric value in units of |
direction |
A character string specifying the response direction
|
end_window |
A numeric value in units of For "biexponential", |
verbose |
Logical. |
... |
Additional arguments passed to the underlying method function.
See Details. For the |
env |
The calling environment or a defused call, used to report errors and warnings as coming from the user-facing function rather than the validator. |
A data.frame with one row per nirs_channel and columns
nirs_channels, model, A, B, TD, tau, k, MRT, HRT,
texc, slope_B, drift_fraction, MRT_fitted, HRT_fitted,
texc_fitted. texc is the excursion point where the drift rate
overtakes the decaying primary rate, never before the drift onset (see
expdrift_onset()). Per-channel metadata are attached as attributes:
"model": an nls model object, or NULL for channels
where fitting failed.
"fitted_data": a named list of per-channel data frames with
columns window_idx and fitted.
"diagnostics": a data.frame with one row per nirs_channel
containing model fit diagnostics.
"channel_args": a data.frame with one row per nirs_channel
recording the resolved arguments used.
"warnings": a data.frame of conditions captured during fitting.
analyse_kinetics(), exponential_drift(),
SSexponential_drift()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.