Hello,
I have a question about doing ALL possible subsets regression with a general linear model. My goal is to produce cumulative Akaike weights for each of 7 predictor variables-to obtain this I need R to: 1. Show me ALL possible subsets, not just the best possible subsets 2. Give me an AIC value for each model (instead of a BIC value). I have tried to do this in library(RcmdrPlugin.HH), and using the "leaps" code below. With the leaps code my problem is that my response is not a vector, it's a single value (density of a species) ANy help would be greatly appreciated. Thanks a lot, Kate ALL-SUBSETS REGRESSIOM DESCRIPTION leaps() performs an exhaustive search for the best subsets of the variables in x for predicting y in linear regression, using an efficient branch-and-bound algorithm. It is a compatibility wrapper for regsubsets [1] does the same thing better. Since the algorithm returns a best model of each size, the results do not depend on a penalty model for model size: it doesn't make any difference whether you want to use AIC, BIC, CIC, DIC, ... USAGE leaps(x=, y=, wt=rep(1, NROW(x)), int=TRUE, method=c("Cp", "adjr2", "r2"), nbest=10, names=NULL, df=NROW(x), strictly.compatible=TRUE) ARGUMENTS x A matrix of predictors y A response vector wt Optional weight vector int Add an intercept to the model method Calculate Cp, adjusted R-squared or R-squared nbest Number of subsets of each size to report names vector of names for columns of x df Total degrees of freedom to use instead of nrow(x) in calculating Cp and adjusted R-squared strictly.compatible Implement misfeatures of leaps() in S -- Kate Cleary MS Candidate Department of Fish, Wildlife, and Conservation Biology Colorado State University Fort Collins, CO 970-491-3535 Links: ------ [1] https://webmail.warnercnr.colostate.edu/leaps/help/regsubsets [[alternative HTML version deleted]] ______________________________________________ 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.