tsdiagplot(x,
           p.max=2, q.max=p.max,
           model=c(p.max, 0, q.max), ## S-Plus
           order=c(p.max, 0, q.max), ## R
           lag.max=36, gof.lag=lag.max,
           armas=if.R(
             s=arma.loop(x, model=model,
               series=deparse(substitute(x)), ...),
             r=arma.loop(x, order=order,
               series=deparse(substitute(x)), ...)),
           diags=diag.arma.loop(armas, x,
                                lag.max=lag.max,
                                gof.lag=gof.lag),
           ts.diag=rearrange.diag.arma.loop(diags),
           lag.units=ts.diag$tspar["frequency"],
           lag.lim=range(pretty(ts.diag$acf$lag))*lag.units,
           lag.x.at=pretty(ts.diag$acf$lag)*lag.units,
           lag.x.labels={tmp <- lag.x.at
                      tmp[as.integer(tmp)!=tmp] <- ""
                      tmp},
           lag.0=TRUE,
           main, lwd=0,
           ...)
acfplot(rdal, type="acf",
        main=paste("ACF of std.resid:", rdal$series,
                   "   model:",         rdal$model),
        lag.units=rdal$tspar["frequency"],
        lag.lim=range(pretty(rdal[[type]]$lag)*lag.units),
        lag.x.at=pretty(rdal[[type]]$lag)*lag.units,
        lag.x.labels={tmp <- lag.x.at
                      tmp[as.integer(tmp)!=tmp] <- ""
                      tmp},
        lag.0=TRUE,
        xlim=xlim.function(lag.lim/lag.units),
        ...)
aicsigplot(z, z.name=deparse(substitute(z)), series.name="ts",
           model=NULL,
           xlab="", ylab=z.name,
           main=paste(z.name,  series.name, model),
           layout=c(1,2), between=list(x=1,y=1), ...)
residplot(rdal,
          main=paste("std.resid:", rdal$series,
                     "   model:",  rdal$model),
          ...)
gofplot(rdal,
        main=paste("P-value for gof:", rdal$series,
                   "   model:",         rdal$model),
       lag.units=rdal$tspar["frequency"],
        lag.lim=range(pretty(rdal$gof$lag)*lag.units),
        lag.x.at=pretty(rdal$gof$lag)*lag.units,
        lag.x.labels={tmp <- lag.x.at
                      tmp[as.integer(tmp)!=tmp] <- ""
                      tmp},
        xlim=xlim.function(lag.lim/lag.units),
        pch=16, ...)model for#ifndef S-Plus
    arima.mle.
#endif
#ifdef S-Plus
    arima.mle.
#endiforder for#ifndef S-Plus
    arima.
#endif
#ifdef S-Plus
    arima.
#endif
    The additional argument seasonal may also be used.arma.loop object.diag.arma.loop object.diag.arma.loop object.frequency(x)xlim in acf and pacf plots.TRUE, then plot the correlation (identically 1)
     at lag=0.
  If FALSE, do not plot the correlation at lag=0."acf" or "pacf"aic or sigma2 component of the
  sumamry of a  arma.loop object."aic" or "sigma2"tsdiagplot sends them to
  arima or arima.mle.  acfplot,
  aicsigplot residplot, and gofplot send them to xyplot.tsdiagplot returns a "tsdiagplot" object which is
  a list of "trellis" objects.  It is printed with its own
  print method.
  The other functions return "trellis" objects.tsacfplots, arma.loopdata(tser.mystery.X)
X <- tser.mystery.X
X.dataplot <- tsacfplots(X, lwd=1, pch.seq=16, cex=.7)
X.dataplot
X.loop <- if.R(
               s=
               arma.loop(X, model=list(order=c(2,0,2)))
               ,r=
               arma.loop(X, order=c(2,0,2))
               )
X.dal <- diag.arma.loop(X.loop, x=X)
X.diag <- rearrange.diag.arma.loop(X.dal)
X.diagplot <- tsdiagplot(armas=X.loop, ts.diag=X.diag, lwd=1)
X.diagplot
X.loop
X.loop[["1","1"]]Run the code above in your browser using DataLab