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?

You need to combine your vectors

  params<-c(vecone, vectwo)

Inside your objective function, you will need to split them out again.

However, I have some suspicions that you are referring to the DATA for the function rather than the parameters that are being optimized. The data goes into the '...' arguments to optim and other optimization tools.

JN

______________________________________________
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