QSA test
QSA_test.Rd
QSA_test
function to test for QSA.
Usage
QSA_test(
.IC,
.ion1,
.ion2,
...,
.nest = NULL,
.X = NULL,
.N = NULL,
.species = NULL,
.t = NULL,
.plot = TRUE
)
Arguments
- .IC
A tibble containing processed ion count data.
- .ion1
A character string constituting the heavy isotope ("13C").
- .ion2
A character string constituting the light isotope ("12C").
- ...
Variables for grouping.
- .nest
A variable hat identifies a series of analyses to calculate the significance of QSA.
- .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()
.).- .plot
Currently not supported.
Value
A tibble::tibble()
containing the
original dataset and adds the variables: beta
, t_QSA
, and
p_QSA
that summarise the results of an linear model fitted by OLS
(respectively; the slope and the associated student's t test statistic and
p value) on the ion count rates of the common isotope (as predictor) and the
isotope ratio (as dependent variable). The p value is for beta
being
different from zero.
.
Details
The accuracy of pulsed ion counting is influenced by systematic errors which depend on the ion counting system. Quasi simultaneous arrival is one of those potential errors that can also impact isotope ratios.
Examples
# Use point_example() to access the examples bundled with this package
# raw data containing 13C and 12C counts on carbonate
tb_rw <- read_IC(point_example("2018-01-19-GLENDON"))
#> Registered S3 methods overwritten by 'readr':
#> method from
#> as.data.frame.spec_tbl_df vroom
#> as_tibble.spec_tbl_df vroom
#> format.col_spec vroom
#> print.col_spec vroom
#> print.collector vroom
#> print.date_names vroom
#> print.locale vroom
#> str.col_spec vroom
# Processing raw ion count data
tb_pr <- cor_IC(tb_rw)
# QSA test
QSA_test(tb_pr, "13C", "12C", file.nm)
#> # A tibble: 11,700 × 12
#> file.nm t.nm Xt.pr.12C Xt.pr.13C N.pr.12C N.pr.13C R_Xt.pr alpha_Xt.pr.12C
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 2018-01-… 0.54 34460. 358. 12040 125 0.0104 0.0114
#> 2 2018-01-… 1.08 34202. 341. 11950 119 0.00996 0.0114
#> 3 2018-01-… 1.62 34632. 395. 12100 138 0.0114 0.0114
#> 4 2018-01-… 2.16 34191. 366. 11946 128 0.0107 0.0114
#> 5 2018-01-… 2.7 34855. 378. 12178 132 0.0108 0.0114
#> 6 2018-01-… 3.24 34672. 369. 12114 129 0.0106 0.0114
#> 7 2018-01-… 3.78 34766. 369. 12147 129 0.0106 0.0114
#> 8 2018-01-… 4.32 34609. 366. 12092 128 0.0106 0.0114
#> 9 2018-01-… 4.86 34414. 406. 12024 142 0.0118 0.0114
#> 10 2018-01-… 5.4 34474. 409. 12045 143 0.0119 0.0114
#> # … with 11,690 more rows, and 4 more variables: beta_Xt.pr.12C <dbl>,
#> # t_Xt.pr.12C <dbl>, p_Xt.pr.12C <dbl>, delta_Xt.pr.12C <dbl>