View source: R/analyse_monoexponential.R
| analyse_monoexponential | R Documentation |
Internal channel-level dispatch for
analyse_kinetics(method = "monoexponential"). Fits a monoexponential
curve to each nirs_channel within a single "mnirs" data frame via
fit_monoexponential(). See analyse_kinetics() for user-facing
documentation.
analyse_monoexponential(
data,
nirs_channels = NULL,
time_channel = NULL,
use_TD = TRUE,
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 |
fix |
An optional named list of model parameters to hold
constant during fitting, e.g. |
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, A, B, TD, tau, k, MRT, HRT, MRT_fitted,
HRT_fitted. 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.
analyse_kinetics(), monoexponential(), SSmonoexponential()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.