View source: R/diagnostics_IC.R
diag_R | R Documentation |
diag_R
wrapper function for diagnostics on isotope count data
diag_R( .IC, .ion1, .ion2, ..., .nest = NULL, .method = "CooksD", .reps = 1, .X = NULL, .N = NULL, .species = NULL, .t = NULL, .output = "inference", .label = "none", .meta = FALSE, .alpha_level = 0.05, .hyp = "none", .plot = FALSE, .plot_type = "static", .plot_stat = NULL, .plot_iso = FALSE, .plot_outlier_labs = c("divergent", "confluent"), .mc_cores = 1 )
.IC |
A tibble containing processed ion count data. |
.ion1 |
A character string constituting the rare isotope ("13C"). |
.ion2 |
A character string constituting the common isotope ("12C"). |
... |
Variables for grouping. |
.nest |
A variable hat identifies a series of analyses to calculate the significance of inter-isotope variability. |
.method |
Character string for the method for diagnostics (default =
|
.reps |
Numeric setting the number of repeated iterations of outlier detection (default = 1). |
.X |
A variable constituting the ion count rate (defaults to
variables generated with |
.N |
A variable constituting the ion counts (defaults to variables
generated with |
.species |
A variable constituting the species analysed (defaults to
variables generated with |
.t |
A variable constituting the time of the analyses (defaults to
variables generated with |
.output |
Can be set to |
.label |
For printing nice latex labels use |
.meta |
Logical whether to preserve the metadata as an attribute (defaults to TRUE). |
.alpha_level |
Significance level of hypothesis test. |
.hyp |
Hypothesis test appropriate for the selected method
(default = |
.plot |
Logical indicating whether plot is generated. |
.plot_type |
Character string determining whether the returned plot is
|
.plot_stat |
Adds a statistic label to the plot (e.g. . |
.plot_iso |
A character string (e.g. |
.plot_outlier_labs |
A character vector of length two for the colourbar text for outliers (default = c("divergent", "confluent")). |
.mc_cores |
Number of workers for parallel execution (Does not work on Windows). |
The diag_R
function performs an internal call to stat_R to perform
diagnostics on the influence of individual measurements on the block-wise or
global (i.e., a complete analysis) statistics. It identifies potentially
influential measurements that indicate heterogeneity in the analytical
substrate or measurement. See
vignette("IC-diagnostics", package = "point")
for more information on
how to use the function, and possible methods for outlier detection. Options
are "CooksD"
(default), "Cameca"
, "Rm"
, "norm_E"
,
"CV"
, "IR"
, and "QQ"
, see the
vignette("IC-diagnostics", package = "point")
for examples and
point::names_plot
. The
argument .output
can be used to toggle between "complete"
;
returning stat_R()
and stat_X()
statistics, diagnostics, and
inference test results, "augmented"
; returning the augmented IC after
removing outliers, "diagnostic"
; for only outlier detection results;
"diagnostic"
; for statistics and outlier detection, or
"inference"
; returns only inference test statistics results
(default = inference).
A ggplot2::ggplot()
is returned
(if .plot = TRUE
) along with a
tibble::tibble()
which can contain statistics
diagnostics, hypothesis test results associated with the chosen method and
depending on the argument .output
.
# Modelled ion count dataset # Cook's D style diagnostic-augmentation of ion count data for # isotope ratios diag_R(simu_IC, "13C", "12C", type.nm, spot.nm, .plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.