Skip to content

Commit db94a39

Browse files
committed
use Rmd to create README files
1 parent 48f2270 commit db94a39

3 files changed

Lines changed: 148 additions & 13 deletions

File tree

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
^_pkgdown\.yml$
66
^docs$
77
^pkgdown$
8+
^README\.Rmd$

README.Rmd

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
output:
3+
github_document:
4+
pandoc_args: [ "--wrap=preserve", "--columns=80" ]
5+
bibliography: inst/REFERENCES.bib
6+
---
7+
8+
<!-- README.md is generated from README.Rmd. Please edit that file -->
9+
10+
```{r, include = FALSE}
11+
knitr::opts_chunk$set(
12+
collapse = TRUE,
13+
comment = "#>",
14+
fig.path = "man/figures/README-",
15+
out.width = "100%"
16+
)
17+
```
18+
19+
20+
# grasps <img src="man/figures/logo.png" align="right" alt="" width="150">
21+
22+
23+
## Groupwise Regularized Adaptive Sparse Precision Solution
24+
25+
26+
<!-- badges: start -->
27+
[![GitHub R package version](https://img.shields.io/github/r-package/v/Carol-seven/grasps?label=R%20in%20dev&color=green)](https://github.com/Carol-seven/grasps/blob/main/DESCRIPTION)
28+
[![GitHub last commit](https://img.shields.io/github/last-commit/Carol-seven/grasps)](https://github.com/Carol-seven/grasps/commits/main)
29+
[![R-CMD-check](https://github.com/Carol-seven/grasps/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Carol-seven/grasps/actions/workflows/R-CMD-check.yaml)
30+
[![GitHub License](https://img.shields.io/github/license/Carol-seven/grasps?color=blue)](https://github.com/Carol-seven/grasps/blob/main/LICENSE.md)
31+
<!-- badges: end -->
32+
33+
34+
The goal of **grasps** is to provide a collection of statistical methods that
35+
incorporate both element-wise and group-wise penalties to estimate a precision
36+
matrix, making them user-friendly and useful for researchers and practitioners.
37+
38+
39+
## Penalties
40+
41+
42+
The package **grasps** provides functions to estimate precision matrices using
43+
the following penalties:
44+
45+
46+
1. Adaptive lasso [@zou2006adaptive;@fan2009network]
47+
48+
2. Lasso [@tibshirani1996regression;@friedman2008sparse]
49+
50+
3. Minimax concave penalty (MCP) [@zhang2010nearly]
51+
52+
4. Smoothly clipped absolute deviation (SCAD) [@fan2001variable;@fan2009network]
53+
54+
55+
## Installation
56+
57+
58+
You can install the development version of **grasps** from
59+
[GitHub](https://github.com/) with:
60+
61+
62+
```
63+
# install.packages("devtools")
64+
devtools::install_github("Carol-seven/grasps")
65+
```
66+
67+
68+
## Example
69+
70+
71+
```
72+
library(grasps)
73+
74+
X <- matrix(rnorm(200), 10, 20)
75+
membership <- c(rep(1,5), rep(2,5), rep(3,4), rep(4,6))
76+
77+
grasps(X, membership = membership, penalty = "lasso", crit = "BIC")
78+
```
79+
80+
81+
## Reference {-}
82+

README.md

Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,90 @@
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
14
# grasps <img src="man/figures/logo.png" align="right" alt="" width="150">
25

6+
## Groupwise Regularized Adaptive Sparse Precision Solution
7+
8+
<!-- badges: start -->
39

410
[![GitHub R package version](https://img.shields.io/github/r-package/v/Carol-seven/grasps?label=R%20in%20dev&color=green)](https://github.com/Carol-seven/grasps/blob/main/DESCRIPTION)
511
[![GitHub last commit](https://img.shields.io/github/last-commit/Carol-seven/grasps)](https://github.com/Carol-seven/grasps/commits/main)
612
[![R-CMD-check](https://github.com/Carol-seven/grasps/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Carol-seven/grasps/actions/workflows/R-CMD-check.yaml)
713
[![GitHub License](https://img.shields.io/github/license/Carol-seven/grasps?color=blue)](https://github.com/Carol-seven/grasps/blob/main/LICENSE.md)
8-
14+
<!-- badges: end -->
915

1016
The goal of **grasps** is to provide a collection of statistical methods that
1117
incorporate both element-wise and group-wise penalties to estimate a precision
1218
matrix, making them user-friendly and useful for researchers and practitioners.
1319

20+
## Penalties
1421

15-
## Installation
22+
The package **grasps** provides functions to estimate precision matrices using
23+
the following penalties:
24+
25+
1. Adaptive lasso (Zou 2006; Fan et al. 2009)
26+
27+
2. Lasso (Tibshirani 1996; Friedman et al. 2008)
28+
29+
3. Minimax concave penalty (MCP) (Zhang 2010)
1630

31+
4. Smoothly clipped absolute deviation (SCAD) (Fan and Li 2001; Fan et al. 2009)
32+
33+
## Installation
1734

1835
You can install the development version of **grasps** from
1936
[GitHub](https://github.com/) with:
2037

21-
``` r
22-
# install.packages("devtools")
23-
devtools::install_github("Carol-seven/grasps")
24-
```
25-
38+
# install.packages("devtools")
39+
devtools::install_github("Carol-seven/grasps")
2640

2741
## Example
2842

43+
library(grasps)
44+
45+
X <- matrix(rnorm(200), 10, 20)
46+
membership <- c(rep(1,5), rep(2,5), rep(3,4), rep(4,6))
47+
48+
grasps(X, membership = membership, penalty = "lasso", crit = "BIC")
49+
50+
## Reference
51+
52+
<div id="refs" class="references csl-bib-body hanging-indent">
53+
54+
<div id="ref-fan2009network" class="csl-entry">
55+
56+
Fan, Jianqing, Yang Feng, and Yichao Wu. 2009. “Network Exploration via the Adaptive LASSO and SCAD Penalties.” *The Annals of Applied Statistics* 3 (2): 521–41. <https://doi.org/10.1214/08-aoas215>.
57+
58+
</div>
59+
60+
<div id="ref-fan2001variable" class="csl-entry">
61+
62+
Fan, Jianqing, and Runze Li. 2001. “Variable Selection via Nonconcave Penalized Likelihood and Its Oracle Properties.” *Journal of the American Statistical Association* 96 (456): 1348–60. <https://doi.org/10.1198/016214501753382273>.
63+
64+
</div>
65+
66+
<div id="ref-friedman2008sparse" class="csl-entry">
67+
68+
Friedman, Jerome, Trevor Hastie, and Robert Tibshirani. 2008. “Sparse Inverse Covariance Estimation with the Graphical Lasso.” *Biostatistics* 9 (3): 432–41. <https://doi.org/10.1093/biostatistics/kxm045>.
69+
70+
</div>
71+
72+
<div id="ref-tibshirani1996regression" class="csl-entry">
73+
74+
Tibshirani, Robert. 1996. “Regression Shrinkage and Selection via the Lasso.” *Journal of the Royal Statistical Society: Series B (Methodological)* 58 (1): 267–88. <https://doi.org/10.1111/j.2517-6161.1996.tb02080.x>.
75+
76+
</div>
77+
78+
<div id="ref-zhang2010nearly" class="csl-entry">
79+
80+
Zhang, Cun-Hui. 2010. “Nearly Unbiased Variable Selection Under Minimax Concave Penalty.” *The Annals of Statistics* 38 (2): 894–942. <https://doi.org/10.1214/09-AOS729>.
81+
82+
</div>
2983

30-
``` r
31-
library(grasps)
84+
<div id="ref-zou2006adaptive" class="csl-entry">
3285

33-
X <- matrix(rnorm(200), 10, 20)
34-
groups <- c(rep(1,5), rep(2,5), rep(3,4), rep(4,6))
86+
Zou, Hui. 2006. “The Adaptive Lasso and Its Oracle Properties.” *Journal of the American Statistical Association* 101 (476): 1418–29. <https://doi.org/10.1198/016214506000000735>.
3587

36-
sggm(X, groups = groups, penalty = "lasso", crit = "BIC")
37-
```
88+
</div>
3889

90+
</div>

0 commit comments

Comments
 (0)