Displaying 1 result from an estimated 1 matches for "cum_time".
Did you mean:
cpu_time
2009 Oct 31
1
avoiding loop
...trying to figure out a way to improve my code's efficiency by avoiding the use of loop.
I want to calculate a conditional mean(?) given time.
For example, from the data below, I want to calculate sum((value|choice==1)/sum(value)) across time.
Is there a way to do it without using a loop?
time cum_time choice value
1 4 1 3
1 4 0 2
1 4 0 3
1 4 0 3
2 6 1 4
2 6 0 4
2 6 0 2
2 6...