Learn R Programming

StatDA (version 1.7.11)

varcomp: Variance Components

Description

This function estimates the variance components for ANOVA.

Usage

varcomp(a1, a2, f1, f2)

Value

pct.regional

percentage of regional variability

pct.site

percentage at site variability

pct.analytical

percentage of analytical variability

pval

p-value

Arguments

a1, a2

analytical duplicates

f1, f2

field duplicates

References

C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical Data Analysis Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.

Examples

Run this code
# field duplicates:
data(CHorFieldDUP)
xfield1=CHorFieldDUP[,5:98]
xfield2=CHorFieldDUP[,99:192]

# anaytical duplicates:
data(CHorANADUP)
xanal1=CHorANADUP[,3:96]
xanal2=CHorANADUP[,97:190]

varcomp(xanal1[,1],xanal2[,1],xfield1[,1],xfield2[,1])

Run the code above in your browser using DataLab