View source: R/ts.diag.summary.R
ts.diag.summary | R Documentation |
Plots the time series and predicted values together, a time series plot of the residuals, a plot of the ACF function of the residuals, and a normal Q-Q plot of the residusls.
ts.diag.summary(ts.fit, data.tsd, all.on.one = TRUE)
ts.fit |
Results object from an lm fit of an autoregressive model. |
data.tsd |
Time series data object corresponding to the AR model that was fit. |
all.on.one |
If TRUE, all of the plot will be included in one frame. Fefault is TRUE. |
spotlag.frame <- as.data.frame(cbind(Spot=c(spot.tsd,NA,NA,NA,NA), Spot1=c(NA,spot.tsd,NA,NA,NA), Spot2=c(NA,NA,spot.tsd,NA,NA), Spot3=c(NA,NA,NA,spot.tsd,NA), Spot4=c(NA,NA,NA,NA,spot.tsd))) spot.ar1.fit <- lm(Spot ~ Spot1, data=spotlag.frame) ts.diag.summary(spot.ar1.fit, data.tsd=spot.tsd) spot.ar1.fit <- lm(Spot ~ Spot1, data=spotlag.frame) ts.diag.summary(spot.ar1.fit, data.tsd=spot.tsd) spot.ar2.fit <- lm(Spot ~ Spot1 + Spot2, data=spotlag.frame) ts.diag.summary(spot.ar2.fit, data.tsd=spot.tsd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.