Is there a way to limit the maximum execution time of a command, so that if the time to compute exceeds the set threshold - stata will give an error and proceed the next command?
I just woke up and saw that some estimation command got stuck at some iteration for more than 8 hours - I wish I could have set the maximum time of estimation for something like 2 hours so that other commands could have been estimated (similar in a way to capture noisily)
for example, say that the first 2 regressions in this code take more than 10 minutes to estimate, while the third one takes 5 minutes - and the maximum time for estimation is set at 8 minutes. I'm looking for something like this:
I just woke up and saw that some estimation command got stuck at some iteration for more than 8 hours - I wish I could have set the maximum time of estimation for something like 2 hours so that other commands could have been estimated (similar in a way to capture noisily)
for example, say that the first 2 regressions in this code take more than 10 minutes to estimate, while the third one takes 5 minutes - and the maximum time for estimation is set at 8 minutes. I'm looking for something like this:
Code:
sysuse auto reg price mpg foreign --- estimation time exceeds max set in c(max_time) --- reg price mpg rep78 --- estimation time exceeds max set in c(max_time) --- reg price mpg Source | SS df MS Number of obs = 74 -------------+------------------------------ F( 1, 72) = 20.26 Model | 139449474 1 139449474 Prob > F = 0.0000 Residual | 495615923 72 6883554.48 R-squared = 0.2196 -------------+------------------------------ Adj R-squared = 0.2087 Total | 635065396 73 8699525.97 Root MSE = 2623.7 ------------------------------------------------------------------------------ price | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- mpg | -238.8943 53.07669 -4.50 0.000 -344.7008 -133.0879 _cons | 11253.06 1170.813 9.61 0.000 8919.088 13587.03 ------------------------------------------------------------------------------
Comment