I cannot replicate the error.
The following seem to work.
Y <- runif(100)
comp <- matrix(runif(6500),100,65)
par <- rep(.5, 28)
optim.results <- optim(par, fn=objective.function, method="Nelder-
Mead",comp=comp, Y=Y, n=100) # Not sure why you are selecting the
columns in the comp. That is probably the error
Nikhil
On Mar 23, 2010, at 3:38 PM, ApproxGaussian wrote:
I apologize, the "c" is in the original coding; I merely misprinted
(copy and
paste).
I have edited the orginal post to reflect this.
--
View this message in context:
http://n4.nabble.com/Optim-Help-Unusual-Error-tp1679363p1679582.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
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.
______________________________________________
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.