[R] maximizing log-likelihood function

Christian Schulz ozric at web.de
Wed Sep 29 16:39:06 CEST 2004


I know that i have to use optim, but i'm confused how its
possible  maximize  the sum over all l[i] and get the optimized
r  and alpha?

LL <- function(trans,time){
   for(i in 1:length(trans){
     l[i] <- log(lgamma(r+trans[i] - 

i'm confused how i have to set r and alpha 
and i found no related help in archives?

...in Excel it works with solver but only for ~65.000 rows :-)

#This notation is 1 for trans  and 1  for time insteda the Startvalues for r 
and alpha?


many thanks  for an easy example or hint 

More information about the R-help mailing list