statsmodels.tsa.stattools.q_stat¶
-
statsmodels.tsa.stattools.
q_stat
(x, nobs, type=None)[source]¶ Compute Ljung-Box Q Statistic.
Parameters: x : array_like
Array of autocorrelation coefficients. Can be obtained from acf.
nobs : int, optional
Number of observations in the entire sample (ie., not just the length of the autocorrelation function results.
Returns: q-stat : ndarray
Ljung-Box Q-statistic for autocorrelation parameters.
p-value : ndarray
P-value of the Q statistic.
Notes
Designed to be used with acf.