[R] How to find the likelihood function?

francogrex francogrex at mail.com
Tue Aug 28 23:44:19 CEST 2007


Hi, I am writing a BRugs code and I need to specify the likelihood for the
gamma distribution and I am specifying it as the pdf:
(pow(b1,a1)/(exp(loggam(a1)))*(exp(-b1*lambda[i]))*pow(lambda[i],(a1-1)))

But it is not accepting it although I know that I could use the pdf in R to
estimate the parameters by MLE. There must be a shorter form that is the
real likelihood function, (I know that for the normal distribution the
likelihood is much shorter than the pdf and it is accepted by BRugs).
Is there like a webpage where the likelihood functions are displayed?

PS: I know that BRugs has a dgamma function and that I do not need to
specify the likelihood function, but it is for some other purpose I am doing
that so that I can afterwards generate a new distribution which is a mixture
of two gamma distributions.

Thanks.

-- 
View this message in context: http://www.nabble.com/How-to-find-the-likelihood-function--tf4344480.html#a12376952
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list