@jl2978 wrote:
Thanks for pointing out the post!
However, the situation is for my data, one "date" has multiple observations and I'll need to use all these observations to calculate covariance. So it'll be difficult for me to specify the rolling window in proc expand, which works on datasets that a date only has one observation.
I'm not clear on how you would use multiple observations on a single date in a rolling window covariance, I don't think you have explained the details. But whatever the method, you would have to program that, and since the link I gave also pointed to some DATA step code, its not unreasonable for you to modify the data step code to handle this.
... View more