[R] find bayesian information criterion for all variable combinations
Ben Bolker
bolker at ufl.edu
Fri Oct 17 22:50:38 CEST 2008
eric lee <ericlee100 <at> gmail.com> writes:
>
> Hi,
>
> I have data for one dependent variable and multiple independent variables
> y = b0 + b1*x1 + b2*x2 + ...
>
> I want to a list of all models that have some subset of the independents
> (just x1 x2, and not x3, etc.) and their corresponding BIC values. Is there
> a pre-existing function that does this? I saw that you can calculate
> individual BIC values using 'lm' and something like
>
> AIC(lm1, k = log(nrow(swiss)))
>
> but, nothing for all combinations. Thanks.
>
> eric
There is a useful but rather dangerous package
available, not from CRAN, called "dRedging", that will
do this.
http://www.zbs.bialowieza.pl/users/kamil/r/
USE AT YOUR OWN RISK -- misused, this will lead
you into terrible statistical practices.
cheers
Ben Bolker
More information about the R-help
mailing list