[R] find bayesian information criterion for all variable combinations
bolker at ufl.edu
Fri Oct 17 22:50:38 CEST 2008
eric lee <ericlee100 <at> gmail.com> writes:
> 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.
There is a useful but rather dangerous package
available, not from CRAN, called "dRedging", that will
USE AT YOUR OWN RISK -- misused, this will lead
you into terrible statistical practices.
More information about the R-help