shenflow
shenflow

Reputation: 335

Setting the confidence interval in acf plots

I plotted the autocorrelation function of a given set of residuals I obtained from estimating a linear regression model:

> require("stats")
> acf(Reg$residuals)

It resulted in the following graphic:

acf plot

I then wanted to look up what kind of confidence interval (95%, 99%) is displayed, but there is no information on that within the help section of the function. In addition to that I could not find a way to adjust the confidence interval manually.

Is there a way to manually set the confidence interval displayed?

Upvotes: 4

Views: 2749

Answers (1)

Ben Bolker
Ben Bolker

Reputation: 226047

See ?plot.acf:

plot(x, ci = 0.95, ...)

and:

ci: coverage probability for confidence interval. Plotting of the confidence interval is suppressed if ci is zero or negative.

That is, the default is 95% confidence intervals, and e.g.:

plot(acf(Reg$residuals), ci = 0.99)

should plot the 99% confidence intervals.

Upvotes: 3

Related Questions