merliseclyde / BAS

BAS R package https://merliseclyde.github.io/BAS/
https://merliseclyde.github.io/BAS/
GNU General Public License v3.0
41 stars 16 forks source link

Add support for handling non-full rank models #24

Closed merliseclyde closed 6 years ago

merliseclyde commented 6 years ago

related to issue #21

merliseclyde commented 6 years ago

added in branch interaction [Edited to add that update is now in master]

Example

devtools::install_github("merlise clyde/BAS")
set.seed(42)
dat = data.frame(Y = rnorm(5), X1=1:5, X2=1:5, X3 = rnorm(5))
lm.ob = lm(Y ~ ., data=dat)
summary(lm.ob)$coefficients
(summary(lm.ob)$sigma)^2

set.seed(42)
tmp = bas.lm(Y ~ ., data=dat, prior="BIC", modelprior=uniform(), method="BAS", pivot=TRUE)