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.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to