Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (18.4k points)
edited by

image

From the above autocorrelation plot, I wanted to calculate the q value of moving average MA(q).

image

From the above autocorrelation plot, I wanted to calculate the p-value of autoregression model AR(p)

1 Answer

0 votes
by (36.8k points)

To calculate ‘p’ and ‘q’ values we must know what is a lag: Lag is the estimated delay like correlation. 

Correlation shows us the similarity between the two ‘time-series’. Autocorrelation shows how similar one time series is with itself.

You can use tidyquant package and use lag.xts() function to calculate:

lag(x, k = 1, na.pad = TRUE...)

X - an xts object

K -period of lag over

Na.pad -pad vector to its original size

If you wish to learn Data Science visit this Data Science Courses and gain knowledge

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...