# Taking the log of a likelihood function

#### MissPucca

Hi everyone,

I've included a likelihood function in my attachment. I'd like to use the log-likelihood of this function, so I've done the following. I've split the formula in six parts (each fraction is 1 part) and have taken the log. So, I now have:

Part 1: gammaln(b+x+1) + gammaln(a+b) - gammaln(a+b+x+1) - gammaln(b)
Part 2: gammaln (r+x) - gammaln(r)
Part 3: r * ln (alpha) - (r+x)* ln (alpha + T)
Part 4: gammaln(a+1) + gammaln(b+x) + gammaln(a+b) - gammaln(a+1+b+x) - gammaln(a)- gammaln(b)
Part 5: equals part 2
Part 6: r * ln (alpha) - (r+x) * ln (alpha + tx)

I've then added all parts (Part1 + Part2+....+Part6). Could anyone please let me know if I've done this correctly? Thanks in advance!

#### Attachments

• 42.3 KB Views: 18

#### Anonymous1

$$\displaystyle \log{L} = \log{B(a,b+X+1)} + 2\log\Gamma(r+x) + 2r\log{\alpha} + \log{B(a + 1,b+X)}$$ $$\displaystyle - 2\log{B(a,b)} - 2\log{\Gamma(r)} - (r+x)\log{(\alpha+T)} - (r+x)\log{(\alpha+t_x)}$$