Re: [R] Likelihood optimization numerically

2008-01-27 Thread Mohammad Ehsanul Karim
Dear List, Probably i am missing something important in optimize: llk.1st <- function(alpha){ x <- c(20.0, 23.9, 20.9, 23.8, 25.0, 24.0, 21.7, 23.8, 22.8, 23.1, 23.1, 23.5, 23.0, 23.0) n <- length(x) llk1 <- -n*log(gamma(alpha)) - n*alpha*log(sum(x)/(n*alpha)) + (alpha - 1)*(sum(log(x))) - (su

Re: [R] Likelihood optimization numerically

2008-01-26 Thread Bill.Venables
: r-help@r-project.org Subject: [R] Likelihood optimization numerically Dear List, I am not sure how should i optimize a log-likelihood numerically: Here is a Text book example from Statistical Inference by George Casella, 2nd Edition Casella and Berger, Roger L. Berger (2002, pp. 355, ex. 7.4 #

[R] Likelihood optimization numerically

2008-01-26 Thread Mohammad Ehsanul Karim
Dear List, I am not sure how should i optimize a log-likelihood numerically: Here is a Text book example from Statistical Inference by George Casella, 2nd Edition Casella and Berger, Roger L. Berger (2002, pp. 355, ex. 7.4 # 7.2.b): data = x = c(20.0, 23.9, 20.9, 23.8, 25.0, 24.0, 21.7, 23.8, 22