Undertakes a random effects model Analysis of Variance (ANOVA) on a set of duplicate measurements to determine if the analytical, or combined sampling and analytical, (within) variability is significantly smaller than the variability across the duplicates. For data stored in alternate form use `anova2`

`anova1(x1, x2, xname = deparse(substitute(x1)), log = FALSE)`

x1

a column vector from a matrix or data frame, `x1[1], ..., x1[n]`

.

x2

another column vector from the matrix or data frame, `x2[1], ..., x2[n]`

. `x1`

and `x2`

must be of identical length, `n`

, where `x2`

is a duplicate measurement of `x1`

.

xname

by default the character string for `x1`

is used for the title. An alternate title can be displayed with `xname = "text string"`

, see Examples.

log

if a logarithmic transformation (base 10) of the data is required to meet homogeneity of variance considerations (i.e. severe heteroscedasticity) set `log = TRUE`

. This is also advisable if the range of the observations exceeds 1.5 orders of magnitude.

In field geochemical surveys the combined sampling and analytical variability is more important than analytical variability alone. If the at site (within) variability is not significantly smaller than the between duplicate sites variability it cannot be stated that there are statistically significant spatial patterns in the data, and they are likely not suitable for mapping. This may not mean that the data cannot be used to recognize individuals with above threshold or action level observations. However, under these conditions there also may be above threshold or action level instances that the survey data have failed to detect (Garrett, 1983).

A random effects ANOVA is undertaken, the ANOVA table is displayed, together with estimates of the variance components, i.e. how much of the total variability is between and within the duplicate measurements, and the USGS mapping reliability measures of V and Vm (Miesch et al., 1976). Additionally, the data are investigated through a two-way model following the procedure of Bolviken and Sinding-Larsen (1973).

If the data are as a single concatenated vector from a matrix or data frame as `x1[1], ..., x1[n]`

followed by `x[n+1], ..., x[2n]`

, or alternated as `x[1]`

and `x[2]`

being a pair through to `x[2*i+1]`

and `x[2*i+2]`

, for the `i in 1:n`

duplicate pairs use function `anova2`

.

Bolviken, B. and Sinding-Larsen, R., 1973. Total error and other criteria in the interpretation of stream sediment data. In Geochemical Exploration 1972, Institution of Mining and Metallurgy, London, pp. 285-295.

Garrett, R.G., 1969. The determination of sampling and analytical errors in exploration geochemistry. Economic Geology, 64(4):568-569.

Garrett, R.G., 1983. Sampling methodology. In Chapter 4 of Handbook of Exploration Geochemistry, Vol. 2, Statistics and Data Analysis in Geochemical Prospecting (Ed. R.J. Howarth), Elsevier, pp. 83-110.

Miesch, A.T. et al., 1976. Geochemical survey of Missouri - methods of sampling, analysis and statistical reduction of data. U.S. Geological Survey Professional Paper 954A, 39 p.

```
# NOT RUN {
## Make test data available
data(ms.data1)
attach(ms.data1)
## Undertake an ANOVA for duplicate measurements on rock samples
anova1(MS.1, MS.2, log = TRUE,
xname = "Duplicate measurements of Magnetic Susceptibility")
## Detach test data
detach(ms.data1)
# }
```

Run the code above in your browser using DataCamp Workspace