View source: R/analyse_biexponential.R
| analyse_biexponential | R Documentation |
Internal channel-level dispatch for
analyse_kinetics(method = "biexponential"). Fits a biexponential
excursion-recovery curve to each nirs_channel within a single "mnirs"
data frame via fit_biexponential(), falling back down the chain in
kinetics_fallbacks where the phases are unsupported. See
analyse_kinetics() for user-facing documentation.
analyse_biexponential(
data,
nirs_channels = NULL,
time_channel = NULL,
use_TD = TRUE,
fix = NULL,
start_time = NULL,
direction = c("auto", "positive", "negative"),
end_window = Inf,
verbose = TRUE,
...,
tau_flex = 1/3,
TD_flex = 2,
A_flex = NULL,
control = NULL,
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; |
fix |
An optional named list of model parameters ( |
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 |
tau_flex |
Numeric; multiplicative half-width of the stage-2
|
TD_flex |
Numeric; additive half-width of the stage-2 |
A_flex |
Numeric; additive half-width of the stage-2 |
control |
An optional |
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, MRT, texc, B2,
tau2, MRT_fitted, texc_fitted, plus the columns of the fallback
models. 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(), biexponential(), SSbiexponential()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.