[R] extracting parameters from vector

Ott Toomet
Sat, 30 Dec 2000 11:30:31 -0000

Dear everybody!

Minimization algorithms usually assume the parameters are in the form of a
single
vector. When calculating target function, e.g. log-likelihood, it is much more
pleasant to extract the vector into separate parameters and program the loglik
using them directly. Are ther any more intelligent ways to do that than just
write
 sigma <- param[1]
 beta <- param[1:1+N]
 ...

I know in GAUSS there is something similar to left-hand functions, i.e. you
can write
 {sigma, beta, ...}= param;
(Sorry, i do not know GAUSS well, so I am not quite sure).

Perhaps it could be handled with lists somehow but I do not want to change the
assumption -- data are in a vector --, used by most minimization algorithms.



Thanks in advance

Ott Toomet

And a happy new year, BTW.