search for: rompo

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

Did you mean: compo
2011 Aug 24
1
problema de selección de valores iniciales en nlm
...#genero un objeto nulo llamado fit try(fit<-nlm(hood2par,c(x01[i],x02[j]),iterlim=300, catch=x[,c(3,4,5)],sp=.5),silent=TRUE) # Con try, evito la rotura de los #bucles cuando nlm no converge stopifnot(is.null(fit)) # si finalmente converge ("fit" ya no es nulo) rompo los bucles con stopifnot } } Cuando fit no es NULL, stopifnot rompe el bucle. El problema que tengo es que cuando trato de embeber la rutina anterior en una función: FFF<-function(x01,x02,catch){ for (i in 1:length(x01)) { for (j in 1:length(x02)) { fit<-NULL try(fit<-nlm(hood2par,c(...