[R] Variable limit in nlm?

Robert Shnidman r.shn at verizon.net
Fri Nov 10 20:58:19 CET 2006


Admittedly I am using an old version 1.7.1, but can anyone tell if this 
is or was a problem. I can only get nlm (nonlinear minimization) to 
adjust the first three components of function variable. No gradient or 
hessian is supplied. E.G.;

fnoise
function(y) { y[5]/(y[4]*sp2) * exp(-((x[,3]-y[1]-y[2]*x[,1]-y[3]
*x[,2])/y[4])^2/2) + (1-y[5])/(y[9]*sp2) * exp(-((x[,3]-y[6]-y[7]*x[,1]-y[8]
*x[,2])/y[9])^2/2) }

nlm(sum(-log(fnoise(y))),c(5,1,1,10,.75,1,.2,.2,6),hessian=TRUE,print.level=2))

Thanks,
Bob



More information about the R-help mailing list