qwRPD: Relative Differences

View source: R/qwRPD.R

qwRPDR Documentation

Relative Differences

Description

Computes the relative percent differences (RDP) between samples and replicates for data of class "qw."

Usage

qwRPD(x, y, incomparables = NA, plotit = FALSE)

Arguments

x

sample data of class "qw."

y

replicate data of class "qw."

incomparables

logical, NA means the RPD for any pair that includes left-censored values is NA (default), FALSE means the RPD for any pair that includes left-censored values is the minimum possible value, and TRUE means the RPD for any pair that includes includes left-censored values returns the range of possible values. See Notes.

plotit

logical, if TRUE, then create a Bland-Altman mean-difference plot (Bland and Altman, 1986); otherwise no plot is created. If incomparables is set to TRUE, then the values corresponding to the respective maximums are plotted.

Value

A vector of the relative percent differences for each paired sample and duplicate. If incomparables is TRUE, then the vector is class "mcens," otherwise the vector id numeric.

Note

This function works differently from other functions that process data of class "qw"—it ignores the reporting level information and uses the data as they are recorded. The treatment of interval-censored data varies depending on incomparables. If incomparables is set to NA or FALSE, then interval-censored data are set to the midrange, otherwise the data are retained as interval-censored data. Right-censored data always return NA regardless of incomparables.

Inverval-censored data are not common and require much additional processing to get accurate ranges for the RPD. Approximate values are returned in this version.

References

Bland J.M. and Altman D.G., 1986 Statistical methods for assessing agreement between two methods of clinical measurement: Lancet, i, p. 307–310.

See Also

rpd


USGS-R/smwrQW documentation built on Oct. 11, 2022, 6:13 a.m.