Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.4%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

mombf package

Basic Info
  • Host: GitHub
  • Owner: davidrusi
  • License: gpl-2.0
  • Language: C++
  • Default Branch: master
  • Size: 2 MB
Statistics
  • Stars: 7
  • Watchers: 1
  • Forks: 3
  • Open Issues: 6
  • Releases: 0
Created about 7 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog Contributing License

README.md

mombf

Model Selection with Bayesian Methods and Information Criteria

Installation

``` r

Install mombf from CRAN

install.packages("mombf")

from GitHub:

install.packages("devtools")

devtools::install_github("davidrusi/mombf") ```

Quick start

The main Bayesian model selection (BMS) function is modelSelection. For information criteria consider bestBIC, bestEBIC, bestAIC, bestIC. Bayesian model averaging (BMA) is also available for some models, mainly linear and generalized linear models. Local variable selection is implemented in localnulltest and localnulltest_fda. Details are in mombf's vignette, here we illustrate quickly how to get posterior model probabilities, marginal posterior inclusion probabilities, BMA point estimates and posterior intervals for the regression coefficients and predicted outcomes.

```r library(mombf) set.seed(1234) x <- matrix(rnorm(1003),nrow=100,ncol=3) theta <- matrix(c(1,1,0),ncol=1) y <- x %% theta + rnorm(100)

priorCoef <- momprior(tau=0.348) # Default MOM prior on parameters priorDelta <- modelbbprior(1,1) # Beta-Binomial prior for model space fit1 <- modelSelection(y ~ x[,1]+x[,2]+x[,3], priorCoef=priorCoef, priorDelta=priorDelta)

Output

Enumerating models...

Computing posterior probabilities................ Done.

```

from here, we can also get the posterior model probabilities:

```r postProb(fit1)

Output

modelid family pp

7 2,3 normal 9.854873e-01

8 2,3,4 normal 7.597369e-03

15 1,2,3 normal 6.771575e-03

16 1,2,3,4 normal 1.437990e-04

3 3 normal 3.240602e-17

5 2 normal 7.292230e-18

4 3,4 normal 2.150174e-19

11 1,3 normal 9.892869e-20

6 2,4 normal 5.615517e-20

13 1,2 normal 2.226164e-20

12 1,3,4 normal 1.477780e-21

14 1,2,4 normal 3.859388e-22

1 normal 2.409908e-25

2 4 normal 1.300748e-27

9 1 normal 2.757778e-28

10 1,4 normal 3.971521e-30

```

also the BMA estimates, 95% intervals, marginal posterior probability

```r coef(fit1)

Output

estimate 2.5% 97.5% margpp

(Intercept) 0.007230966 -0.02624289 0.04085951 0.006915374

x[, 1] 1.134700387 0.93487948 1.33599873 1.000000000

x[, 2] 1.135810652 0.94075622 1.33621298 1.000000000

x[, 3] 0.000263446 0.00000000 0.00000000 0.007741168

phi 1.100749637 0.83969879 1.44198567 1.000000000

```

and BMA predictions for y, 95% intervals

```r ypred <- predict(fit1) head(ypred)

Output

mean 2.5% 97.5%

1 -0.8936883 -1.1165154 -0.67003262

2 -0.2162846 -0.3509188 -0.08331286

3 1.3152329 1.0673711 1.56348261

4 -3.2299241 -3.6826696 -2.77728625

5 -0.4431820 -0.6501280 -0.23919345

6 0.7727824 0.6348189 0.90977798

cor(y, ypred[,1])

Output

[,1]

[1,] 0.8468436

```

Bug report

Please submit bug reports to the issue tracker.

Owner

  • Login: davidrusi
  • Kind: user

GitHub Events

Total
  • Push event: 10
Last Year
  • Push event: 10

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 526
  • Total Committers: 9
  • Avg Commits per committer: 58.444
  • Development Distribution Score (DDS): 0.567
Past Year
  • Commits: 26
  • Committers: 1
  • Avg Commits per committer: 26.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
drossell d****l@e****b 228
proebuck p****k@e****b 178
davidrusi r****d@g****m 82
oriolabril o****l@e****b 20
Oriol Abril o****a@g****m 9
Miquel Torrens m****l@M****l 4
mtorrens m****s@b****u 3
Christoph Semken d****v@c****u 1
csemken 3****n 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 6
  • Total pull requests: 27
  • Average time to close issues: 14 days
  • Average time to close pull requests: about 1 month
  • Total issue authors: 4
  • Total pull request authors: 4
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.26
  • Merged pull requests: 26
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • OriolAbril (3)
  • Sherlock-YH-Tang (1)
  • michaelquinn32 (1)
  • wdkrnls (1)
Pull Request Authors
  • OriolAbril (20)
  • mtorrens (3)
  • csemken (2)
  • michaelquinn32 (1)
Top Labels
Issue Labels
good first issue (1) hacktoberfest (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 1,141 last-month
  • Total docker downloads: 21,777
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 53
  • Total maintainers: 1
cran.r-project.org: mombf

Model Selection with Bayesian Methods and Information Criteria

  • Versions: 53
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 1,141 Last month
  • Docker Downloads: 21,777
Rankings
Docker downloads count: 12.5%
Downloads: 16.4%
Forks count: 17.0%
Average: 18.1%
Dependent packages count: 18.1%
Stargazers count: 20.6%
Dependent repos count: 23.8%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.14.0 depends
  • methods * depends
  • mgcv * depends
  • mvtnorm * depends
  • ncvreg * depends
  • Rcpp >= 0.12.16 imports
  • glmnet * imports
  • mclust * imports
  • pracma * imports
  • sgd * imports
  • survival * imports
  • parallel * suggests
  • patrick * suggests
  • testthat * suggests