From the ACF graph, you can see the ranges in blue. I need the value of the range in the ACF graph. Can this be retrieved?
Asked
Active
Viewed 109 times
0
-
so what code gives you this graph? – erasmortg Apr 11 '22 at 14:13
-
i import `from statsmodels.graphics.tsaplots import plot_acf` and `plot_acf(data)` – Beginner Apr 11 '22 at 14:16
1 Answers
1
You can use the statsmodels.tsa.stattools.acf
function for this:
from statsmodels.tsa.stattools import acf
import pandas as pd
df = pd.read_csv("file.csv")
acf_results = acf(x=df, alpha=0.05)
acf_results[0] #autocorrelation
acf_results[1] #confidence intervals
https://www.statsmodels.org/dev/generated/statsmodels.tsa.stattools.acf.html

Arne Decker
- 808
- 1
- 3
- 9