Skip to content
/ susieR Public
forked from stephenslab/susieR

an R package for "sum of single effects" regression

Notifications You must be signed in to change notification settings

sqsun/susieR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

susieR

an R package for "sum of single effects" regression

This is very much work in progress, and the interface will likely change under you! If you want to use it, I recommend you contact me at [email protected].

Quick Start

This fits a sparse linear regression model with up to $L$ non-zero effects. Generally there is no harm in over-stating $L$ (that is, the method is pretty robust to overfitting) except that computation will grow as $L$ grows.

Here is a minimal example:

devtools::install_github("stephenslab/susieR")
set.seed(1)
n = 1000
p = 1000
beta = rep(0,p)
beta[1] = 1
beta[2] = 1
beta[3] = 1
beta[4] = 1
X = matrix(rnorm(n*p),nrow=n,ncol=p)
y = X %*% beta + rnorm(n)
res =susie(X,y,L=10)
coef(res)
plot(y,predict(res))

More

Take a look at the vignettes subdirectory for more examples.

About

an R package for "sum of single effects" regression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%