https://github.com/cran/season
Raw File
Tip revision: 623c23691f150810ea6c9740889d41a4b5f1bf97 authored by Adrian Barnett on 08 October 2009, 00:00:00 UTC
version 0.2-2
Tip revision: 623c236
seasrescheck.R
# seasrescheck.R
# seasonal residual checks
# April 2009

seasrescheck<-function(res){
op <- par(no.readonly = TRUE) # the whole list of settable par's.
par(mfrow=c(2,2),lwd=1)
# histogram
par(mai=c(0.7,0.7,0.1,0.1)) # c(bottom, left, top, right)
hist(res,col='gray',main='',xlab='')
# scatter plot
plot(res,type='p',main='',xlab='')
lines(c(1,length(res)),c(0,0),lty=2)
# autocovariance
acf(res,type='correlation',main='',ylab='Autocorrelation')
# cumulative periodogram
cpgram(res,main='')
par(mfrow=c(1,1))
# box plot?
par(op) # restore graphic settings
}
back to top