Skip to content

automatic model selection based on BIC in MLE

2 messages · Michael, Gavin Simpson

#
Hi all,

Could anybody point me to an automatic model selection based on BIC
for my MLE fitting problem, in R?

I would imagine I just have to supply the MLE LLF function, and the
dimension of the problem and the number of observations should be
embedded in the definition of the LLF itself.

And then the automatical model selection procedure will select the
best model for me.

Thanks!
1 day later
#
On Thu, 2009-05-21 at 20:47 -0700, Michael wrote:
?stepAIC
If you write a method for the logLik generic for your objects, then the
AIC() function in R can be used to compute BIC. Take a look at ?AIC and
getAnywhere(AIC.default) and then at the existing methods for logLik
functions to see what you need to copy for your object. Once you have
logLik and therefore AIC working, stepAIC will just work for your
objects.

Whether stepwise selection makes sense for your purposes is another
question.

G