Have you worked through the examples in the help pages for 'optim'
and 'nlminb'? Also, 'nls', 'nlm', and 'mle{stats4}' provide related
capabilities.
If you'd like further help from this groups, please submit another
post. To increase your chances of a quick, informative re
How to convert the following ms() in Splus to Optim in R? The "Calc" function
is also attached.
ms(~ Calc(a.init, B, v, off, d, P.a, lambda.a, P.y, lambda.y,
10^(-8), FALSE, 20, TRUE)$Bic,
start = list(lambda.a = 0.5, lambda.y = 240),
control = list(maxiter = 10, tol = 0.1))
Ca