A stationary process can be decomposed into random components that occur at different frequencies. The spectral density of a stationary process describes the relative importance of these random components.
Stata’s psdensity command estimates the spectral density of a stationary process using the parameters of a previously estimated parametric model.
Consider the changes in the number of manufacturing employees in the United States:
The horizontal line corresponds to the mean. There appear to be more runs above the mean, and more runs below the mean, than we would expect from a series without autocorrelation. These runs suggest positive autocorrelation.
Fitting these data to a first-order autoregressive process confirms our suspicions:
|D.manemp||Coef. Std. Err. z P>|z| [95% Conf. Interval]|
|_cons||-.0198164 .0661281 -0.30 0.764 -.149425 .1097923|
|L1.||.517689 .020377 25.41 0.000 .4777509 .5576271|
|/sigma||.7933988 .0080698 98.32 0.000 .7775824 .8092153|
The statistically significant estimate of 0.518 for the autoregressive coefficient indicates that there is an important amount of positive autocorrelation in this series.
Next we can use psdensity to estimate the spectral density of the process implied by the estimated parameters.
The above graph is typical of a spectral density of an AR(1) process with a positive coefficient. The curve is highest at frequency 0, and it tapers off toward zero or a positive asymptote. This estimated spectral density tells us that the low-frequency random components are the most important random components of an AR(1) process with a positive autoregressive coefficient.
Explore more time-series features in Stata.