Command Reference : Function Reference : Function Reference: M
  
 
@movcor
Trailing moving population correlations (propagate NAs).
n-period trailing moving Pearson product moment population correlations between a pair of variables, with d.f. correction, propagating NAs.
Syntax: @movcor(x, y, n)
x: series
y: series
n integer, series
Return: series
For each observation and integer , compute the correlations () using the current and previous observations of the series,
and ignoring missing values (NAs).
If n is not an integer, the integer floor will be used.
Examples
show @movcor(x, y, 12)
produces a linked series of the moving population correlation of the series x and y where NAs are propagated.
Cross-references
See also @movcor for moving correlation, and @movcov and @movcovs for trailing moving covariances.
See @mcor for an NA-excluding version of this function.