[R] Optimizing given two vectors of data

Joris Meys jorismeys at gmail.com
Fri Jun 25 14:18:34 CEST 2010

Optim uses vectors of _parameters_, not of data. You add a
(likelihood) function, give initial values of the parameters, and get
the optimized parameters back. See ?optim and the examples therein. It
contains an example for optimization using multiple data columns.


On Fri, Jun 25, 2010 at 8:12 AM, confusedSoul <Ruchir_402598 at infosys.com> wrote:
> I am trying to estimate an Arrhenius-exponential model in R.  I have one
> vector of data containing failure times, and another containing
> corresponding temperatures.  I am trying to optimize a maximum likelihood
> function given BOTH these vectors.  However, the optim command takes only
> one such vector parameter.
> How can I pass both vectors into the function?
> --
> View this message in context: http://r.789695.n4.nabble.com/Optimizing-given-two-vectors-of-data-tp2268002p2268002.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at 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.

Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Joris.Meys at Ugent.be
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

More information about the R-help mailing list