Displaying 1 result from an estimated 1 matches for "logitseb".
2012 May 26
2
avoid error within for loop, try, trycatch, while, move to next iteration, unlist
...e a crash and stop the whole procedure, what I want is to simply move on to the next iteration automatically and discard the "bad" repetitions from my results. I used the "try" function to do this and it partially works.
Here is the thing:
logitsboots <- function(x,y,Jbh) {
logitseb=0;logitspb=0;
for (j in 1:1) {
#some code here that has to do with random numbers that may or may not produce an error and calculates the values of two scalar quantities: spboots and seboots,
logitspb=log(spboots/(1-spboots))
logitseb=log(seboots/(1-seboots))
#assume that I only care...