if (FALSE) {
# create a test data set, composed of 7 variables:
# antiphased 20 kyr cycles with noise,
# antiphased 40 kyr cycles with noise,
# antiphased 110 kyr cycles with noise,
# and a variable that is entirely noise
noise=0.01
a=cycles(1/20,noisevar=noise,genplot=FALSE)
b=cycles(1/20,phase=pi,noisevar=noise,genplot=FALSE)
c=cycles(1/40,noisevar=noise,genplot=FALSE)
d=cycles(1/40,phase=pi,noisevar=noise,genplot=FALSE)
e=cycles(1/110,noisevar=noise,genplot=FALSE)
f=cycles(1/110,phase=pi, noisevar=noise,genplot=FALSE)
g=ar1(npts=500,genplot=FALSE)
ex=data.frame(cbind(a[,1],a[,2],b[,2],c[,2],d[,2],e[,2],f[,2],g[,2]))
stratPCA(ex)
stratPCA(ex,rot=1,nPC=4)
stratPCA(ex,rot=2,nPC=4)
}
Run the code above in your browser using DataLab