On Sat, 13 Jun 2015, Alecos Papadopoulos wrote:
 In the Help we read, as regards the accessor $llt
 <<
 $llt
 Output:     series
 For selected models estimated via Maximum Likelihood, returns the series of 
 per-observation log-likelihood values.
 At present this is supported only for binary logit and probit, tobit and 
 heckit.
>>
 But what if I estimate a model using the mle  command in a hand-made a 
 script? Will the accessor work?
 It appears not:
 After the "end mle" line I typed
 series llobs = $llt
 and I got "The statistic you requested is not available". But maybe I have 
 not incorporated it correctly.
 Motive: I need the per-observation log-likelihood values to run Vuong's 
 (1989) LR tests to select between non-nested models. 
As the help says, the $llt accessor isn't supported after an mle block. 
However, there's a very easy solution. If you predefine the series which 
contains the loglikelihood during the mle iteration, it will survive the 
mle command and be available for further use. For example:
<hansl>
nulldata 100
p = 0.45
series x = uniform() < p
series ll = NA
mle ll = ln(p) * x + ln(1-p) * (1-x)
     params p
end mle
</hansl>
And the series "ll" will contain what you need.
-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)
   Università Politecnica delle Marche
   (formerly known as Università di Ancona)
   r.lucchetti(a)univpm.it
   
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------