Adam Zeilinger <zeil0006 <at> umn.edu> writes: > > Dear R Help, > > I have two nested negative log-likelihood functions that I am optimizing > with the spg function [BB package]. I would like to perform model > selection on these two objective functions using AIC (and possibly > anova() too). However, the spg() function returns a list and I need a > fitted model object for AIC(), ICtab() [bbmle package], or anova(). > > How can I perform AIC-based model selection on two spg-optimized > objective functions? Alternatively, how can I convert the list returned > by spg into a fitted model object that can be run in AIC, ICtab, or anova? >
I believe you can use spg within mle2 by specifying optimizer="optimx", method="spg" ... that should give you a fitted mle2 object that you can work with. Alternately, it's just not that hard to compute the AICs yourself ... or a likelihood ratio test ... Ben Bolker ______________________________________________ R-help@r-project.org 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.