An uncorrelated time series can still be serially dependent due to a dynamic conditional variance process. A time series exhibiting conditional heteroscedasticity—or autocorrelation in the squared series—is said to have autoregressive conditional heteroscedastic (ARCH) effects. Engle's ARCH test is a Lagrange multiplier test to assess the significance of ARCH effects .
Consider a time series
where is the conditional mean of the process, and is an innovation process with mean zero.
Suppose the innovations are generated as
where zt is an independent and identically distributed process with mean 0 and variance 1. Thus,
for all lags and the innovations are uncorrelated.
Let Ht denote the history of the process available at time t. The conditional variance of yt is
Thus, conditional heteroscedasticity in the variance process is equivalent to autocorrelation in the squared innovation process.
Define the residual series
If all autocorrelation in the original series, yt, is accounted for in the conditional mean model, then the residuals are uncorrelated with mean zero. However, the residuals can still be serially dependent.
The alternative hypothesis for Engle's ARCH test is autocorrelation in the squared residuals, given by the regression
where ut is a white noise error process. The null hypothesis is
To conduct Engle's ARCH test using archtest, you need to specify the lag m in the alternative hypothesis. One way to choose m is to compare loglikelihood values for different choices of m. You can use the likelihood ratio test (lratiotest) or information criteria (aicbic) to compare loglikelihood values.
To generalize to a GARCH alternative, note that a GARCH(P,Q) model is locally equivalent to an ARCH(P + Q) model. This suggests also considering values m = P + Q for reasonable choices of P and Q.
The test statistic for Engle's ARCH test is the usual F statistic for the regression on the squared residuals. Under the null hypothesis, the F statistic follows a distribution with m degrees of freedom. A large critical value indicates rejection of the null hypothesis in favor of the alternative.
As an alternative to Engle's ARCH test, you can check for serial dependence (ARCH effects) in a residual series by conducting a Ljung-Box Q-test on the first m lags of the squared residual series with lbqtest. Similarly, you can explore the sample autocorrelation and partial autocorrelation functions of the squared residual series for evidence of significant autocorrelation.
 Engle, Robert F. "Autoregressive Conditional Heteroskedasticity with Estimates of the Variance of United Kingdom Inflation." Econometrica. Vol. 50, 1982, pp. 987–1007.