Thanks Duncan and Mario. It works fine now.
On Tue, Apr 12, 2011 at 3:11 PM, Duncan Murdoch wrote:
> On 11-04-12 2:33 AM, vioravis wrote:
>
>> I am trying to optimize a nested function using nlminb. This throws out an
>> error that y is missing. Can someone help me with the correct syntax??
>> Th
On 11-04-12 2:33 AM, vioravis wrote:
I am trying to optimize a nested function using nlminb. This throws out an
error that y is missing. Can someone help me with the correct syntax?? Thank
you.
See ?nlminb. The parameters to optimize should be given as a vector in
a single parameter. Other p
P.S.: It is bad taste to call a variable 'sum' because it is a R function.
Ciao!
mario
On 12-Apr-11 08:33, vioravis wrote:
I am trying to optimize a nested function using nlminb. This throws out an
error that y is missing. Can someone help me with the correct syntax?? Thank
I am trying to optimize a nested function using nlminb. This throws out an
error that y is missing. Can someone help me with the correct syntax?? Thank
you.
test1 <- function(x,y)
{
sum <- x + y
return(sum)
}
test2 <- function(x,y)
{
sum <- test1(x,y)
sumSq <- sum*sum
return(sumSq)
}
n
4 matches
Mail list logo