[R] Error: function cannot be evaluated at initial parameters

sandsky realstone at hotmail.com
Fri Sep 19 04:33:32 CEST 2008


I have an error for a simple optimization problem. Is there anyone knowing
about this error?

lambda1=-9
lambda2=-6
L<-function(a){
s2i2f<-(exp(-lambda1*(250^a)-lambda2*(275^a-250^a))
       -exp(-lambda1*(250^a)-lambda2*(300^a-250^a)))
logl<-log(s2i2f)
return(-logl)}
optim(1,L)

Error in optim(1, L) : function cannot be evaluated at initial parameters

Thank you in advance
-- 
View this message in context: http://www.nabble.com/Error%3A--function-cannot-be-evaluated-at-initial-parameters-tp19565286p19565286.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list