search for: data_q

Displaying 1 result from an estimated 1 matches for "data_q".

Did you mean: data_r
2009 Mar 02
3
Partial sum of a vector
I am trying to run a loop where I can sum parts of a matrix. For example, I want at each step in the loop to sum the the next 4-values of a vector. I tried to do the following but the result were wrong:   for (i in 4:T) { data_q[i-3,]=sum(data_m[i-3,]:data_m[i,]) }   can anyone please direct me on what should I do to run this loop properly   Thanks in advance [[alternative HTML version deleted]]