Learn R Programming

blindspiker (version 0.2.0)

table_false: Make table of false positives and false negatives in laboratory results

Description

Make a table with estimated confidence intervals for false negatives and false positives for an analyte in the data set.

Usage

table_false(select_analyte, dat = bs_df)

Value

table of false positive and false negative results

Arguments

select_analyte

the selected analyte for this table

dat

data frame with all data needed as described in `bs_prep_and_analysis`.

Details

False negatives are the number of laboratory results that missed a spiked value. For the false negative rate, the numerator is the number of laboratory results less than detection level for spiked samples. The denominator is the number or spiked samples.

False positives are the number of laboratory results above detection level when the analyte identified by the laboratory was not in the spiked sample. For the false positive rate, the numerator is the number of false positives. The denominator is the number of false positives plus number of true negatives.

The total error rate is the total number of laboratory results with either false negative or false positive results divided by the total number of laboratory results.

Examples

Run this code
example_spike_data <- system.file('extdata', 'spikevals.csv', package = 'blindspiker')
example_lab_data <- system.file('extdata', 'labvals.csv', package = 'blindspiker')
example_df <- bs_prep_and_analysis(spike_data = example_spike_data, lab_data = example_lab_data)
table_false(select_analyte = "Sr-90", dat = example_df)

Run the code above in your browser using DataLab