Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhub committed Feb 20, 2024
1 parent 864be71 commit 7b184ae
Showing 1 changed file with 28 additions and 38 deletions.
66 changes: 28 additions & 38 deletions README.md
Expand Up @@ -8,13 +8,12 @@
<!-- badges: start -->

[![Travis build
status](https://travis-ci.org/jrhub/spinBayes.svg?branch=master)](https://travis-ci.org/jrhub/spinBayes)
[![CRAN](https://www.r-pkg.org/badges/version/spinBayes)](https://cran.r-project.org/package=spinBayes)
[![Codecov test
coverage](https://codecov.io/gh/jrhub/spinBayes/branch/master/graph/badge.svg)](https://codecov.io/gh/jrhub/spinBayes?branch=master)
[![CRAN RStudio mirror
downloads](http://cranlogs.r-pkg.org/badges/spinBayes)](http://www.r-pkg.org/pkg/spinBayes)
[![R-CMD-check](https://github.com/jrhub/spinBayes/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jrhub/spinBayes/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

Many complex diseases are known to be affected by the interactions
Expand All @@ -36,28 +35,28 @@ implemented in C++.

## Features

- BVCfit() integrates five different models for G×E Bayesian variable
selection. <!-- + sparse --> <!-- + VC --> <!-- + structural -->
- Generic functions BVSelection(), predict() and plot() make the
workflow very simple (see ‘Examples’).
- Highly efficient c++ implementation for MCMC algorithm.
<!-- * Testing coverage >80% -->
<!-- [![Codecov test coverage](https://codecov.io/gh/jrhub/spinBayes/branch/master/graph/badge.svg)](https://codecov.io/gh/jrhub/spinBayes?branch=master) -->
- BVCfit() integrates five different models for G×E Bayesian variable
selection. <!-- + sparse --> <!-- + VC --> <!-- + structural -->
- Generic functions BVSelection(), predict() and plot() make the
workflow very simple (see ‘Examples’).
- Highly efficient c++ implementation for MCMC algorithm.
<!-- * Testing coverage >80% -->
<!-- [![Codecov test coverage](https://codecov.io/gh/jrhub/spinBayes/branch/master/graph/badge.svg)](https://codecov.io/gh/jrhub/spinBayes?branch=master) -->

## How to install

- To install from github, run these two lines of code in R
- To install from github, run these two lines of code in R

<!-- end list -->
<!-- -->

install.packages("devtools")
devtools::install_github("jrhub/spinBayes")

- Released versions of spinBayes are available on CRAN
<!-- [(link)](https://cran.r-project.org/package=spinBayes) --> ,
and can be installed within R via
- Released versions of spinBayes are available on CRAN
<!-- [(link)](https://cran.r-project.org/package=spinBayes) --> , and
can be installed within R via

<!-- end list -->
<!-- -->

install.packages("spinBayes")

Expand All @@ -69,18 +68,18 @@ implemented in C++.

library(spinBayes)
data(gExp.L)

test = sample((1:nrow(X2)), floor(nrow(X2)/5))
spbayes=BVCfit(X2[-test,], Y2[-test,], Z2[-test,], E2[-test,], clin2[-test,])
spbayes

selected = BVSelection(spbayes)
selected

pred = predict(spbayes, X2[test,], Z2[test,], E2[test,], clin2[test,], Y2[test,])
pred$pmse
# c(pred$y.pred)

## plot the varying effects
plot(spbayes)

Expand All @@ -89,60 +88,51 @@ implemented in C++.
#### Example.2 (non-structural)

data(gExp.L)

test = sample((1:nrow(X2)), floor(nrow(X2)/5))
spbayes=BVCfit(X2[-test,], Y2[-test,], Z2[-test,], E2[-test,], clin2[-test,], structural=FALSE)
spbayes

selected = BVSelection(spbayes)
selected

pred = predict(spbayes, X2[test,], Z2[test,], E2[test,], clin2[test,], Y2[test,])
pred$pmse
# c(pred$y.pred)

#### Example.3 (non-sparse)

data(gExp.L)

test = sample((1:nrow(X2)), floor(nrow(X2)/5))
spbayes=BVCfit(X2[-test,], Y2[-test,], Z2[-test,], E2[-test,], clin2[-test,], structural=TRUE, sparse=FALSE)
spbayes

selected = BVSelection(spbayes)
selected

pred = predict(spbayes, X2[test,], Z2[test,], E2[test,], clin2[test,], Y2[test,])
pred$pmse
# c(pred$y.pred)

<!-- ## News -->

<!-- ### regnet 0.3.0 [2018-5-21] -->

<!-- * Two new, easy to use, integrated interfaces: cv.regnet() and regnet(). -->

<!-- * New methods for continuous and survival responses. -->

<!-- * The new "clv" argument allows the presence of clinical variables that are not subject to penalty in the X matrix. -->

<!-- ### regnet 0.2.0 [2017-10-14] -->

<!-- * Provides c++ implementation for coordinate descent algorithms. This update significantly increases the speed of cross-validation functions in this package. -->

## Methods

This package provides implementation for methods proposed in

- Ren, J., Zhou, F., Li, X., Chen, Q., Zhang, H., Ma, S., Jiang, Y.,
Wu, C. (2019) Semi-parametric Bayesian variable selection for
gene-environment interactions. *Statistics in Medicine* 39: 617–
638. <https://doi.org/10.1002/sim.8434>
- Ren, J., Zhou, F., Li, X., Chen, Q., Zhang, H., Ma, S., Jiang, Y.,
Wu, C. (2019) Semi-parametric Bayesian variable selection for
gene-environment interactions. *Statistics in Medicine* 39: 617– 638.
<https://doi.org/10.1002/sim.8434>

<!-- ## References -->

<!-- * Wu, C., and Ma, S. (2015). A selective review of robust variable selection with applications in bioinformatics. [Briefings in Bioinformatics, 16(5), 873–883](http://doi.org/10.1093/bib/bbu046) -->

<!-- * Wu, C., Shi, X., Cui, Y. and Ma, S. (2015). A penalized robust semiparametric approach for gene-environment interactions. [Statistics in Medicine, 34 (30): 4016–4030](https://doi.org/10.1002/sim.6609) -->

<!-- * Wu, C, Jiang, Y, Ren, J, Cui, Y, Ma, S. (2018). Dissecting gene-environment interactions: A penalized robust approach accounting for hierarchical structures.[Statistics in Medicine, 37:437–456](https://doi.org/10.1002/sim.7518) -->

0 comments on commit 7b184ae

Please sign in to comment.