Re: [R] probl with optimization

2007-04-29 Thread fc502
ok...beta and lambda are the parameters that i ve to find. beta is a scalar and lambda is a 2x1 vector i ll have a look to the debugging tools, thnx! f On Apr 29 2007, Prof Brian Ripley wrote: >On Sun, 29 Apr 2007, [EMAIL PROTECTED] wrote: > >> hi everyone! >> >> i've got a problem in optimizing

Re: [R] probl with optimization

2007-04-29 Thread Prof Brian Ripley
On Sun, 29 Apr 2007, [EMAIL PROTECTED] wrote: > hi everyone! > > i've got a problem in optimizing the following function > > fun <- function(theta){ > theta <- rbind(beta,lambda) > fun <- sum(exp(h(beta)%*%lambda)) > fun > } Well, what are beta and lambda? Trying to optimize a function that does

[R] probl with optimization

2007-04-29 Thread fc502
hi everyone! i've got a problem in optimizing the following function fun <- function(theta){ theta <- rbind(beta,lambda) fun <- sum(exp(h(beta)%*%lambda)) fun } where h(beta) is h <- function(beta,...){ g1 <- matrix(0,b,M) g2 <- matrix(0,b,M) h1 <- matrix(0,b,1) h2 <- matrix(0,b,1) for(