Description Usage Arguments Value Author(s) See Also Examples
Produces theoretical correlation plot
1 |
g |
vector of autocorrelations at lags 1,..,length(g) |
LagZeroQ |
start plot at lag zero with g[0]=1 |
ylab |
vertical axis label |
main |
plot title |
... |
optional graphical parameters |
No value. Plot is produced via plot function.
A.I. McLeod and Y. Zhang
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #
#Simple example, plot acf for AR(1)
phi<-0.8
maxLag<-20
g<-phi^(1:maxLag)
AcfPlot(g)
AcfPlot(g, LagZeroQ=FALSE)
#
# Plot the sample inverse partial autocorrelations.
# On the basis of this plot, Cleveland (1972) suggested an ARp(1,2,7)
# for this data
"InverseAcf" <-
function(z, p=15){
g<-TacvfMA(GetFitARpLS(z-mean(z),1:p)$phiHat, lag.max=p)
g/g[1]
}
#
data(SeriesA)
AcfPlot(InverseAcf(SeriesA),LagZeroQ=FALSE)
|
Loading required package: lattice
Loading required package: leaps
Loading required package: ltsa
Loading required package: bestglm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.