shrinkcovmat

Provides nonparametric Steinian shrinkage estimators of the covariance matrix that are suitable in high dimensional settings, that is when the number of variables is larger than the sample size.

https://github.com/anestistouloumis/shrinkcovmat

Science Score: 46.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
    Links to: sciencedirect.com
  • Committers with academic emails
    2 of 2 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (21.0%) to scientific vocabulary

Keywords

covariance-matrix r shrinkage-estimators
Last synced: 7 months ago · JSON representation

Repository

Provides nonparametric Steinian shrinkage estimators of the covariance matrix that are suitable in high dimensional settings, that is when the number of variables is larger than the sample size.

Basic Info
Statistics
  • Stars: 8
  • Watchers: 2
  • Forks: 4
  • Open Issues: 0
  • Releases: 0
Topics
covariance-matrix r shrinkage-estimators
Created almost 9 years ago · Last pushed over 2 years ago
Metadata Files
Readme

README.Rmd

---
output: rmarkdown::github_document
references:
- id: Touloumis2015
  title: Nonparametric Stein-type Shrinkage Covariance Matrix Estimators in High-Dimensional Settings
  author:
  - family: Touloumis
    given: Anestis
  container-title: Computational Statistics \& Data Analysis
  volume: 83
  URL: 'https://www.sciencedirect.com/science/article/pii/S0167947314003107'
  page: 251-261
  type: article-journal
  issued:
    year: 2015
csl: biometrics.csl    
---




```{r setup, include=FALSE}
knitr::opts_chunk$set(
  tidy = TRUE,
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-")
```

# ShrinkCovMat: Shrinkage Covariance Matrix Estimators

[![Github version](`r paste0("https://img.shields.io/badge/GitHub%20-", as.vector(read.dcf('DESCRIPTION')[, 'Version']),"-green.svg")`)]("commits/master")
[![R-CMD-check](https://github.com/AnestisTouloumis/ShrinkCovMat/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/AnestisTouloumis/ShrinkCovMat/actions/workflows/R-CMD-check.yaml)
[![Project Status: Active The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) 
[![Codecov test coverage](https://codecov.io/gh/AnestisTouloumis/ShrinkCovMat/branch/master/graph/badge.svg?token=qBztxEiCLU)](https://codecov.io/gh/AnestisTouloumis/ShrinkCovMat)

[![CRAN Version](https://www.r-pkg.org/badges/version/ShrinkCovMat?color=blue)](https://CRAN.R-project.org/package=ShrinkCovMat)
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/ShrinkCovMat?color=blue)](https://cranlogs.r-pkg.org/badges/grand-total/ShrinkCovMat)
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/ShrinkCovMat)](https://CRAN.R-project.org/package=ShrinkCovMat)


## Installation

You can install the release version of `ShrinkCovMat`:

```{r eval=FALSE}
install.packages("ShrinkCovMat")
```

The source code for the release version of `ShrinkCovMat` is available on CRAN at:

- https://CRAN.R-project.org/package=ShrinkCovMat

Or you can install the development version of `ShrinkCovMat`:

```{r eval=FALSE}
# install.packages('devtools')
devtools::install_github("AnestisTouloumis/ShrinkCovMat")
```

The source code for the development version of `ShrinkCovMat` is available on github at:

- https://github.com/AnestisTouloumis/ShrinkCovMat

To use `ShrinkCovMat`, you should first load the package as follows:

```{r}
library("ShrinkCovMat")
```

## Usage

This package provides estimates of the covariance matrix and in particular, it implements the nonparametric Stein-type shrinkage covariance matrix estimators proposed in @Touloumis2015. These estimators are suitable and statistically efficient regardless of the dimensionality.

Each of the three implemented shrinkage covariance matrix estimates is a convex linear combination of the sample covariance matrix and of a target matrix. The core function is called `shrinkcovmat` and the argument `target` defines one of the following three options for the target matrix: 

- the identity matrix (`target = "identity"`),
- the scaled identity matrix (`target = "spherical"`),
- the diagonal matrix with diagonal elements the corresponding sample variances (`target = "diagonal"`).

Calculation of the corresponding optimal shrinkage intensities is discussed in @Touloumis2015.

The utility function `targetselection` is designed to ease the selection of the target matrix. This is based on empirical observation by inspecting the estimated optimal intensities and the range and average of the sample variances.


## Example
Consider the colon cancer data example analyzed in @Touloumis2015. The data consists of two tissue groups: the normal tissue group and the tumor tissue group.
```{r}
data(colon)
normal_group <- colon[, 1:40]
tumor_group <- colon[, 41:62]
```
To decide the target matrix for covariance matrix of the normal group, inspect the following output:
```{r}
targetselection(normal_group)
```
The estimated optimal shrinkage intensity for the spherical matrix is slightly larger than the other two. In addition the sample variances appear to be of similar magnitude and their average is smaller than 1. Thus, the spherical matrix seems to be the most appropriate target for the covariance matrix. The resulting covariance matrix estimate is:
```{r}
estimated_covariance_normal <- shrinkcovmat(normal_group, target = "spherical")
estimated_covariance_normal
```
We follow a similar procedure for the tumor group: 
```{r}
targetselection(tumor_group)
```
As before, we may choose the spherical matrix as the target matrix. The resulting covariance matrix estimate for the tumor group is:
```{r}
estimated_covariance_tumor <- shrinkcovmat(tumor_group, target = "spherical")
estimated_covariance_tumor
```


## How to cite
```{r echo=FALSE, comment=NA}
citation("ShrinkCovMat")
```

# References

Owner

  • Name: Anestis Touloumis
  • Login: AnestisTouloumis
  • Kind: user
  • Location: Brighton, UK
  • Company: University of Brighton

GitHub Events

Total
Last Year

Committers

Last synced: about 3 years ago

All Time
  • Total Commits: 123
  • Total Committers: 2
  • Avg Commits per committer: 61.5
  • Development Distribution Score (DDS): 0.049
Top Committers
Name Email Commits
Anestis Touloumis A****s@b****k 117
Anestis Touloumis a****9@b****k 6
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: 6 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 2.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • 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
  • Blunde1 (2)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 184 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 10
  • Total maintainers: 1
cran.r-project.org: ShrinkCovMat

Shrinkage Covariance Matrix Estimators

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 184 Last month
Rankings
Forks count: 12.8%
Stargazers count: 19.8%
Average: 29.0%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Downloads: 47.3%
Maintainers (1)
Last synced: 7 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • Rcpp >= 1.0.1 imports
  • covr * suggests
  • testthat >= 2.1.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite