Evaluate effect size and significance of outliers on R
eval_diag.Rd
eval_diag
function for the evaluation of effect size and significance
of outliers on R detected with diagnostics, such as Cook's D or sigma
rejection (Cameca default method).
Usage
eval_diag(
.IC,
.ion1,
.ion2,
...,
.nest = NULL,
.X = NULL,
.N = NULL,
.species = NULL,
.t = NULL,
.flag = NULL,
.execution = NULL,
.output = "inference",
.tf = "ppt",
.label = "none",
.meta = FALSE,
.mc_cores = 1
)
Arguments
- .IC
A tibble containing ion count data and diagnostics generated with
diag_R()
, as a minimum the outlierflag
variable is required.- .ion1
A character string constituting the rare isotope (e.g. "13C").
- .ion2
A character string constituting the common isotope (e.g. "12C").
- ...
Variables for grouping.
- .nest
A variable hat identifies a series of analyses to calculate the significance of inter-isotope variability.
- .X
A variable constituting the ion count rate (defaults to variables generated with
read_IC()
)- .N
A variable constituting the ion counts (defaults to variables generated with
read_IC()
.).- .species
A variable constituting the species analysed (defaults to variables generated with
read_IC()
).- .t
A variable constituting the time of the analyses (defaults to variables generated with
read_IC()
).- .flag
A variable constituting the outlier flag (defaults to variables generated with
diag_R()
).- .execution
A variable constituting the iterative cycles of diagnostics (defaults to variables generated with
diag_R()
).- .output
A character string for output as summary statistics ("inference") and statistics with the original data ("complete").
- .tf
Variable transformation as parts per thousand (
"ppt"
) or log ("log"
) before mixed linear model application.- .label
A character string indicating whether variable names are latex (
"latex"
) or webtex ("webtex"
) compatible. Will be extended in the futuredefault = NULL
.- .meta
Logical whether to preserve the metadata as an attribute (defaults to TRUE).
- .mc_cores
Number of workers for parallel execution (Does not work on Windows).
Value
A tibble::tibble()
with model output.
See point::names_model
for more information on the model results.
Examples
# Simulated IC data
tb_dia <- diag_R(simu_IC, "13C", "12C", type.nm, spot.nm,
.output = "diagnostic")
# Evaluate significance and effect of outliers based on Cook's D
eval_diag(tb_dia, "13C", "12C", type.nm, spot.nm, .nest = type.nm,
.X = Xt.pr, .N = N.pr, .species = species.nm, .t = t.nm)
#> # A tibble: 9 × 11
#> execution type.nm spot.nm ratio.nm M_R_Xt.pr F_R_Xt.pr p_R_Xt.pr
#> <dbl> <chr> <int> <chr> <dbl> <dbl> <dbl>
#> 1 1 asymmetric 1 13C/12C 0.0111 63.2 1.28e-39
#> 2 1 asymmetric 2 13C/12C 0.0111 74.9 1.09e-46
#> 3 1 asymmetric 3 13C/12C 0.0111 71.9 6.70e-45
#> 4 1 ideal 1 13C/12C 0.0112 0.267 8.49e- 1
#> 5 1 ideal 2 13C/12C 0.0112 0.219 8.83e- 1
#> 6 1 ideal 3 13C/12C 0.0112 1.73 1.59e- 1
#> 7 1 symmetric 1 13C/12C 0.0110 105. 2.00e-64
#> 8 1 symmetric 2 13C/12C 0.0110 127. 2.81e-77
#> 9 1 symmetric 3 13C/12C 0.0110 122. 1.42e-74
#> # … with 4 more variables: hat_M_M_R_Xt.pr <dbl>, hat_RS_M_R_Xt.pr <dbl>,
#> # dAIC_M_R_Xt.pr <dbl>, p_M_R_Xt.pr <dbl>