Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# Re: st: change the format of the pseudo log-likelihood in gb2fit

 From Michal Brzezinski To statalist@hsphsun2.harvard.edu Subject Re: st: change the format of the pseudo log-likelihood in gb2fit Date Thu, 5 Jul 2012 23:15:09 +0200

```You can recover pseudo log-likelihood writing an explicit expression
for log-likelihood for a given model.
For example, in case of GB2 model you could try the following code:

gb2fit dec, cdf(gb2cdf) pdf(gb2pdf) svy
tempvar ll
local wv= "`e(wvar)'"

gen `ll' = lngamma(e(bp)+e(bq)) + log(e(ba)) + (e(ba)*e(bp)-1)* log(dec) ///
- e(ba)*e(bp)*log(e(bb)) - lngamma(e(bp)) - lngamma(e(bq)) - ///
(e(bp)+e(bq))*log(1+(dec/e(bb))^e(ba))
qui sum `ll' [aw=`wv'] if e(sample),meanonly
di r(sum)

----------
Hope this helps,
Michal

2012/7/5 Lucia Latino <Latino@economia.uniroma2.it>:
> Dear Statalist,
>
> After running - gb2fit - smfit - lognfit - Stata reports the pseudo
> log-likelihood with the scientific notation, but I want to view the full
> likelihood.
> Usually, I can obtain the full log-likelihood by using - display e(ll) -
>
> However, I need to add the option svy for the estimation (e.g. - gb2fit dec,
> stats cdf(gb2cdf) pdf(gb2pdf) svy - ) and after adding the option 'svy',
> Stata doesn't store anymore the pseudo log-likelihood in e(ll).
>
> Is there any way to do change the format of the pseudo log-likelihood in the
> iterations or a way to obtain it after the estimation?
>
> I hope someone can help me.
>
> Thanks,
>
> Lucia
>
> --
> *********************************
> Lucia Rita Latino
> PhD International Economics
> Department of Economics
> University of Rome "Tor Vergata"
> Via Columbia, 2 - 00133 Roma
> (0039) 328 77 90 239
> Latino@Economia.uniroma2.it
>
> ----------------------------------------------------------------
> Invito da parte dell'Ateneo:
> Il tuo futuro e quello della Ricerca Scientifica hanno bisogno del
> tuo aiuto. Dona il  5 x mille all'Universita' di Roma Tor Vergata
> codice fiscale: 80213750583 http://5x1000.uniroma2.it
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```