MCout <- function(X, title){ # for a time series X, plots the series, ACF and histogram par(mfrow=c(1,3)) T <- length(X) beg1 <- 1 # min(beg1, T/2) beg2 <- 1 # min(beg2, T/2) plot(X[beg1:T], main=title, type="l") acf(X[beg2:T], main = "") # paste("ACF of", title)) hist(X[beg1:T], main ="" ) # paste("Histogram of", title) ) par(mfrow=c(1,1)) }