################## ##SCRIPT TO ILLUSTRATE PREISENDORFER CALCULATIONS ################### source("http://www.climateaudit.org/data/mbh98/preisendorfer.functions.txt") target=read.table("http://www.climateaudit.org/data/mbh98/preisendorfer.info.dat",sep="\t",header=TRUE) mbhdata="http://www.climateaudit.org/data/mbh98/UVA" #STAHLE 1750 EXAMPLE plotf(7) ##VAGANOV EXAMPLE plotf(19) #results for all mannomatic cases in preis_mannomatic.tab ##NOAMER COMPARISON i=8;x=preis_emulation(network=target$network[i],step=target$period[i]) test=preis_emulation(network=target$network[8],step=target$period[8],method="covariance") #Do Plot illustrated at CA ylim0=1.2*max(x[1,]);M=nrow(x) plot(1:M,x$preis,type="l",lwd=2,col=4,las=1,ylab="",xlim=c(0,10.2),xlab="",xaxs="i",ylim=c(0,.4),yaxs="i") points(1:M,x$lambda,col=4) abline(h=2/M,lty=2) points(1:M,test$lambda,col=2,pch="+") lines(1:M,test$preis,col=2,lwd=2) title(main=paste(target$network[i],": AD",target$period[i],sep="") ) temp=( (x$lambda-x$preis)>0); target$preis[i]=sum(temp) L=target$series[i];points(1:L,x$lambda[1:L],pch=19,col=4) arrows(x0=2.2, y0=.382, x1=1.15, y1=.382, length = 0.1, angle = 30, code = 2, col = 4, lty = 1, lwd = 4) arrows(x0=5, y0=.12, x1=4.15, y1=.08, length = 0.1, angle = 30, code = 2, col = 2, lty = 1, lwd = 4) legend(5.5,.4,fill=c(4,2),legend=c("Mannomatic","Centered (Cov)"))