Bert Gunter <gunter.berton <at> gene.com> writes:

> 
> I certainly second all Jeff's comments.
> 
> **HOWEVER** :
> http://www.tandfonline.com/doi/pdf/10.1080/00401706.1978.10489610
> 
> IIRC, DUD's provenance is old, being originally a BMDP feature.
> 

  If you want to do derivative-free nonlinear least-squares fitting
you could do something like:

library("bbmle")
dnorm2 <- function(x,mean,log=FALSE) {
   ssq <- sum((x-mean)^2)
   n <- length(x)
   dnorm(x,mean,sd=ssq/n,log=log)
}
mle2(y~dnorm2(mean=a*x^b),data=...,method="Nelder-Mead")

  This is not necessarily the most efficient/highly tuned possibility,
but it is one reasonably quick way to get going (you can substitute
other derivative-free optimizers, e.g.

library("optimx")
mle2(...,optimizer="optimx",method="bobyqa")

(I think).

  This isn't the exact algorithm you asked for, but it might serve
your purpose.

  Ben Bolker

______________________________________________
R-help@r-project.org 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.

Reply via email to