| group_mm | R Documentation |
Clean a data frame, fit one or more working variance models within each group, and compare the competing fits using quasi-AIC as the primary criterion, with quasi-BIC and RMSE reported alongside it.
group_mm(data, s, v, groups = NULL,
variance_models = default_variance_models(), power_values = NULL,
include_auto = FALSE, power_selection = c("quasi_aic", "quasi_bic"),
power_grid = default_power_grid(), interval_level = 0.95,
invalid_response_values = c(-9999),
invalid_substrate_values = numeric(0), allow_zero_substrate = TRUE,
sort_x = TRUE, quiet = FALSE, variance_functions = NULL)
## S3 method for class 'group_mm'
print(x,
digits = max(3L, getOption("digits") - 2L), ...)
## S3 method for class 'group_mm'
plot(x, which_groups = NULL, model = NULL,
interval = TRUE, interval_type = c("prediction", "confidence"),
level = NULL, ncol = NULL, main = NULL,
xlab = "Substrate concentration", ylab = "Reaction velocity", ...)
data |
A data frame containing Michaelis-Menten observations. |
s |
Name of the substrate concentration column. |
v |
Name of the response column. |
groups |
Optional character vector of grouping columns. |
variance_models |
Character vector of built-in variance models. The
special value |
power_values |
Optional numeric vector of fixed exponents for
additional |
include_auto |
Logical; if |
power_selection |
Criterion used by the automatic candidate:
|
power_grid |
Candidate exponents used by the automatic candidate. |
interval_level |
Confidence level forwarded to |
invalid_response_values |
Values to remove before fitting. |
invalid_substrate_values |
Values to remove before fitting. |
allow_zero_substrate |
Logical; if |
sort_x |
Logical; sort observations within each group by concentration. |
quiet |
Logical; if |
variance_functions |
Optional named list of fixed, vectorized positive
functions |
x |
A grouped fit object for the print and plot methods. |
which_groups |
Optional subset of groups to plot, matched against
|
model |
Optional model name to use for every group. When |
interval |
Logical; if |
interval_type |
Either |
level |
Optional interval level. Defaults to the level stored in each fit. |
ncol |
Optional number of panel columns in the grouped display. |
main |
Optional panel title or titles. |
xlab |
Label for the x-axis. |
ylab |
Label for the y-axis. |
digits |
Number of printed digits. |
... |
Additional arguments passed to S3 methods. |
Custom variance functions use the same definition in every group and must obey
the contract in variance_function. Group-specific scales are
estimated, but shape parameters in the functions are treated as fixed. Ranking
criteria and intervals omit uncertainty from external shape estimation or model
selection. This is a set of separate single-curve fits, not a clustered model.
An object of class "group_mm" containing cleaned data, fit
summaries, augmented residual output, grouped rankings, and fitted objects.
grouped <- group_mm(
data = sdl_demo,
s = "s_uM",
v = "v_uM_per_min",
groups = "enzyme",
variance_models = c("constant", "sqrt"),
power_values = 0.4,
include_auto = TRUE,
quiet = TRUE
)
grouped
head(
grouped$comparison$best_by_group[
,
c("group_label", "model", "selected_model", "quasi_aic", "quasi_bic", "rmse")
]
)
plot(grouped, interval_type = "confidence")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.