I want to execute the following loop
The problem arises when PF`i' is not regularly spaced. How can I force the loop to continue and ignore if PF`i' has missing sequential number i.e. if PF1 and PF2 are followed by PF4, the loop will stop.
Code:
forval i = 1/500 {
qui sum Ri if PF`i' > 10
loc LF = r(mean)
...
...
...
}

Comment