[R] AIC for heckit

Brian Ripley ripley at stats.ox.ac.uk
Fri Dec 1 23:29:05 CET 2006


As I read it hectik() in micEcon does not fit by maximum likelihood, so 
AIC is undefined.  (People seem to have a magic faith in AIC as a 
universal panacea, but it does come with a long list of conditions for 
applicability.)

heckit's $probit is apparently only part of the fitting, but for any model 
fit we would always recommend the extractor functions (e.g. AIC()) over 
messing with components of the fit.

On Fri, 1 Dec 2006, Jay Emerson wrote:

>> I have used the heckit function in micEcon.
>> ...
>> How can I then get the AIC for this model?
>
> It appears that the heckit $probit object is of class 'glm' and so, for
> example:
>
> main.result <- heckit(whateveryouaredoing)        # Do your heckit()...
> probit.result <- main.result$probit         # The glm object produced by
> heckit()
> probit.aic <- probit.result$aic                 # The AIC, see ?glm
>
> should have what you need, ready to go.  I used these tedious names and
> three lines of code just to be clear about what is what (I wouldn't really
> do it this way).  !)
>
> Jay
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list