Learn R Programming

rgr (version 1.0.4)

fences: Generate and Display Fence Values

Description

Function to generate fence values to support the selection of the upper and lower bounds of background variability, i.e. threshold(s) or action levels, when an obvious graphical solution is not visually recognizable.

Usage

fences(xx, display = TRUE)

Arguments

xx
name of the variable to be processed.
display
the default is to display the tabular output on the current device, i.e. display = TRUE. However, when the function is used in conjunction with fences.summary then display = FALSE<

Details

The fence values are computed by several procedures both with and without a logarithic data transformation, together with the 98th percentile of the data for display. These computations are based on results returned from function gx.stats. Fences are computed following Tukey's boxplot procedure, as median +/- 2 * MAD (Median Absolute Deviation), and mean +/- 2 * SD (Standard Deviation), see Reimann et al. (2005). It is essential that these estimates are viewed in the context of the graphical distributional displays, e.g., shape and its graphical components, gx.hist, gx.ecdf, cnpplt and bxplot, and if spatial coordinates for the sample sites are available edamap7, edamap8 and caplot. The final selection of a range for background or the selection of a threshold level needs to take the statistical and spatial distributions of the data into account. It is also necessary to be aware that it might be appropriate to have more than one background range/threshold in an area (Reimann and Garrett, 2005). The presence of relevant information in the data frame may permit the data to be subset on the basis of criteria using the tbplot and bwplot functions. If these indicate that the medians and middle 50%s of the data are visibly different, multiple background ranges may be advisable.

References

Reimann, C. and Garrett, R.G., 2005. Geochemical background - Concept and reality. Science of the Total Environment, 350(1-3):12-27. Reimann, C., Filzmoser, P. and Garrett, R.G., 2005. Background and threshold: critical comparison of methods of determination. Science of the Total Environment, 346(1-3):1-16.

See Also

gx.stats, fences.summary, ltdl.fix.df, remove.na

Examples

Run this code
## Make test data available
data(kola.o)
attach(kola.o)

## Display the fences computed for Cu
fences(Cu)

## Detach test data
detach(kola.o)

Run the code above in your browser using DataLab