messages from mle function
Dears useRs, I am using the mle function but this gives me the follow erros that I don't understand. Perhaps there is someone that can help me. thank you for you atention. Bernardo.
erizo <- read.csv("Datos_Stokes_1.csv", header = TRUE)
head(erizo)
EDAD TALLA 1 0 7.7 2 1 14.5 3 1 16.9 4 1 13.2 5 1 24.4 6 1 22.5
TAN <- function(edad,f,c,a,d) (1/sqrt(f))*log(abs(2*f*(edad-c)+ 2*sqrt((f^2)*((edad-c)^2)+f*a)))+d
loglike = function(f,c,a,d) {
+ edad <- erizo$EDAD + LT <- erizo$TALLA + N <- length(edad) + sigma <- sum((LT - TAN(edad,f,c,a,d))^2) / N + logl <- (N/2)*log(sigma) + (sum((LT - TAN(edad,f,c,a,d))^2) / (2*sigma)) + }
ini.pars <- list(f=5.91e-05,c=-0.41732,a=0.009661,d=846.7179) library(stats4) erizo.mle <- mle(start= ini.pars, minuslogl = loglike, method="Nelder-Mead", control = list(maxit=1500, trace=TRUE))
Nelder-Mead direct search function minimizer
function value for initial parameters = 1159.477620
Scaled convergence tolerance is 1.72776e-05
Stepsize computed as 84.671790
BUILD 5 3165.307359 1159.477620
.
.
.
HI-REDUCTION 303 1158.377359 1158.377314
LO-REDUCTION 305 1158.377339 1158.377303
LO-REDUCTION 307 1158.377321 1158.377303
Exiting from Nelder Mead minimizer
309 function evaluations used
Error en optim(start, f, method = method, hessian = TRUE, ...) :
non-finite finite-difference value [1]
Adem?s: Hubo 50 o m?s avisos (use warnings() para ver los primeros 50)