
Rescale a series to match the mean and variance of another series
Source:R/rescale_to_match.R
rescale_to_match.RdApplies the linear transformation to y that matches the mean and the
standard deviation of x on their overlapping (jointly observed) sample.
Useful to compare measures of the same shock that are expressed in
different units, for example a predicted shock and a proxy.