Re: [R] AIC for heckit

2006-12-06 Thread Werner Wernersen
Thanks for the hint, Jay!
But somehow it seems like the included $probit object
is not of class glm and I 
couldn't find an AIC property on it. I tried it your
way. Any other suggestions 
regarding how I can evaluate the fit of the first-step
selection model included 
in heckit()?

Best,
   Werner


> From: "Jay Emerson" <[EMAIL PROTECTED]>
> Subject: Re: [R] AIC for heckit
> To: r-help@stat.math.ethz.ch
> Message-ID:
> 
<[EMAIL PROTECTED]>
> Content-Type: text/plain
> 
>> > 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
> 
> -- John W. Emerson (Jay) Assistant Professor of
Statistics Director of Graduate Studies Department of
Statistics Yale University
http://www.stat.yale.edu/~jay

__
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.


Re: [R] AIC for heckit

2006-12-01 Thread Brian Ripley
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,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
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.


Re: [R] AIC for heckit

2006-12-01 Thread Jay Emerson
> 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

-- 
John W. Emerson (Jay)
Assistant Professor of Statistics
Director of Graduate Studies
Department of Statistics
Yale University
http://www.stat.yale.edu/~jay

[[alternative HTML version deleted]]

__
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.