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