sum of series of arrays

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

sum of series of arrays

Unread post by tclark »

I have time series of matrices (e.g., ser[symm] and ser[rec]) for which I take the sum. I currently use a do loop over time to compute the sums needed. Is there a command or function available to do this (compute the sums of the the time series of matrices) faster? Thanks much.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: sum of series of arrays

Unread post by TomDoan »

I'm not sure whether you're summing over time, element by element, or summing over the elements at a given time period.
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

Re: sum of series of arrays

Unread post by tclark »

I need to take the sum over time of the time series of the matrices in question, to get a matrix of the same shape.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: sum of series of arrays

Unread post by TomDoan »

You can loop over the dimensions and use SSTATS to compute the sum over time, but that's probably no quicker.
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

Re: sum of series of arrays

Unread post by tclark »

Ok, thanks
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Post Reply