search for: ssqfun

Displaying 1 result from an estimated 1 matches for "ssqfun".

Did you mean: estfun
2008 Apr 04
2
suggested minor patch for optim.R
....ufl.edu/bolker/optim_new.R) adds three lines to optim.R that issue a warning if any names of elements of "control" fail to match the internal object that contains the defaults. Here is code that shows the behavior: set.seed(1001) x <- rnorm(10) y <- rnorm(10,mean=1+2*x,sd=0.2) ssqfun <- function(p) { sum((y-(p[1]+p[2]*x))^2) } ## use bogus control variable O1 <- optim(fn=ssqfun,par=c(1,2),control=list(maxint=100)) ## get new version source(url("http://www.zoo.ufl.edu/bolker/optim_new.R")) O2 <- optim(fn=ssqfun,par=c(1,2),control=list(maxint=100)) O3 <- opt...