Hi. Is there a simple command that gives the power set of a vector
(that is, all its subsets)? I'm trying to run 256 variants of a least
squares model involving a maximum of 8 independent variables
(including the intercept) and then compute their posterior odds. I
figure if I can get all the subsets of the names of the X data.frame I
would be able to do this quickly, using a loop in which
subset.of.names <-- ?? names(X) ??
lm(data.frame(y,X[,row(matrix(names(X)))[names(X)==subset.of.names]]))
...
Thanks a lot in advance.
- Bin Chen
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|