Hello,

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
max(LL), r  and alpha?

LL <- function(trans,time){
   for(i in 1:length(trans){
     l[i] <- log(lgamma(r+trans[i] - 
gamma(r+1)*(alpha/alpha+t[i]))**r)*(t[i]/alpha+t[i]))**trans[i]
}
return(sum(l))
   }

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 instead the Startvalues for r 
and alpha?

optim(c(1,1),-LL)

many thanks  for an easy example or hint 
regards,christian

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to