###JUCKES STATISTICS library(lmtest) juckes.recon<-read.table("http://www.climateaudit.org/data/mitrie/juckes.recon.txt",header=TRUE,sep="\t") instr<-read.table("http://www.climateaudit.org/data/mitrie/juckes.instr.txt",header=TRUE,sep="\t") instr<-ts(instr,start=1856) juckes.recon<-ts(juckes.recon,start=1000) z<-ts.union(juckes.recon[,"union"],instr) z<-data.frame(z);names(z)<-c("recon","instr") fm<-lm(recon~instr,data=z[857:981,]);summary(fm) #Residual standard error: 0.1325 on 123 degrees of freedom #Multiple R-Squared: 0.4631, Adjusted R-squared: 0.4588 #F-statistic: 106.1 on 1 and 123 DF, p-value: < 2.2e-16 dwtest(fm) #DW = 1.09, p-value = 1.018e-07 arima(fm$residuals,order=c(1,0,1)) #Coefficients: # ar1 ma1 intercept # 0.9505 -0.7545 -0.0104 #s.e. 0.0406 0.0941 0.0440 #sigma^2 estimated as 0.01207: log likelihood = 98.38, aic = -188.75