search for: likn_alpha

Displaying 1 result from an estimated 1 matches for "likn_alpha".

2005 Nov 11
1
optim not giving correct minima
...) gives is clearly not correct. I can see that my likelihood does in fact have a unique maximum. Any ideas why this might be? The data given below was generated such that the true parameters should be (0.3001, -1.8971). Here is an example piece of data and the function: #function to maximize likN_alpha <- function(params,N){ thetas <- exp(params) k <- length(thetas) N <- c(rep(0,(k-1)),N) l <- length(N) lik <- 0 for(i in (k):(l-1)){ lambda <- thetas%*%N[i:(i-k+1)] lik <- -lambda + N[i+1]*log(lambda) + lik } ret...