Hi all!
I'm running some simulations and I need to estimate some paramaters with
optim( ),
in some cases optim stops with the next message:
"L-BFGS-B needs finite values of 'fn' "
I would like to know how to include and "if" condition when this happen,
could it be something like:
myfun <- optim(....) # run my function
????
if(myfun == ERROR) ..... # when the error message is "L-BFGS-B needs
finite values of 'fn'
????
I've succesfully achieved when, for example convergence is not reached,
if(myfun$convergence != 0)
but I don't know how to do it in the other case
Any help??
Thanks in advance,
Dae-Jin
--
__________________________________
Dae-Jin Lee
Despacho: 7.3.J04
Tlfno: 91 624 9175
Fax: 91 624 9430
Departamento de EstadÃstica
Av. Universidad 30, Ed. Juan Benet
28911 Leganés (Madrid)
Universidad Carlos III de Madrid
e-mail: [EMAIL PROTECTED]
web: http://www.est.uc3m.es/daejin
__________________________________
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.