GithubHelp home page GithubHelp logo

mittelmark / snha Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 165 KB

St. Nicolas House Algorithm implementation in R - predicting correlation networks using association chains

License: Other

Makefile 0.86% R 90.30% TeX 7.69% CSS 1.14%
network network-analysis correlation-analysis network-reconstruction r-package

snha's Introduction

Snha package

R package which implements the St. Nicolas House Algorithm (SNHA) for constructing networks of correlated variables using a ranking of the pairwise correlation values. The package contains the R code for the papers:

  • Groth, D., Scheffler, C., & Hermanussen, M. (2019). Body height in stunted Indonesian children depends directly on parental education and not via a nutrition mediated pathway-Evidence from tracing association chains by St. Nicolas House Analysis. Anthropologischer Anzeiger, 76(5), 445-451. https://doi.org/10.1127/anthranz/2019/1027
  • Hermanussen, M., Aßmann, C., & Groth, D. (2021). Chain Reversion for Detecting Associations in Interacting Variables—St. Nicolas House Analysis. International journal of environmental research and public health, 18(4), 1741 https://doi.org/10.3390/ijerph18041741

For an implementation of the algorithm in Python look here https://github.com/thake93/snha4py.

Statistics

  • Downloads - total:
  • Downloads - monthly:
  • Downloads - weekly:

Installation

Either install the package directly from CRAN as usually:

install.packages('snha')

Or to use the latest version from the Github repository install it like this:

library(remotes)
remotes::install_github("https://github.com/mittelmark/snha")

Thereafter you can check the installation like this:

library(snha)
citation("snha")

Which should display something like this:

> citation("snha")
To cite package 'snha' in publications use:

> citation("snha")

To cite package ‘snha’ in publications use:

  Detlef Groth, University of Potsdam (2023). snha: St.
  Nicolas House Algorithm for R. R package version 0.1.3

...

As there are currently no differences between the CRAN and the Github repository the CRAN install is the recommended way.

Example

The package has a function snha where you give your data as input. The function creates an object of class snha which you can plot and explore easily. Here an example just using the swiss data which are part of every R installation:

> library(snha)
> library(MASS)
> data(swiss)
> colnames(swiss)=abbreviate(swiss)
> as=snha(swiss,method="spearman")
> plot(as)
> plot(as,layout="sam",vertex.size=8)
> ls(as)
[1] "alpha"         "chains"        "data"          "method"
[5] "p.values"      "probabilities" "sigma"         "theta"
[9] "threshold"
> as$theta
     Frtl Agrc Exmn Edct Cthl In.M
Frtl    0    0    1    0    0    1
Agrc    0    0    0    1    0    0
Exmn    1    0    0    1    1    0
Edct    0    1    1    0    0    0
Cthl    0    0    1    0    0    0
In.M    1    0    0    0    0    0

The theta object contains the adjacency matrix with the edges for the found graph. For more details consult the package vignette: vignette(package="snha","tutorial") or the manual package of the package ?snha or ?'snha-package'.

Author and Copyright

Author: Detlef Groth, University of Potsdam, Germany

License: MIT License see the file LICENSE for details.

Contributors

The following persons have contributed to the package with ideas, testing, etc.:

  • Michael Hermanussen (Aschauhof, the algorithm idea)
  • Masiar Novine (University of Potsdam, evaluating different data generation methods and comparing the algorithm swit other approaches)
  • Tim Hake (University of Potsdam, Python port and critical discussions about directed edges)
  • Bernhard Bodenberger (University of Potsdam, evaluating the bootstrap performances and different parts of the algorithm)
  • Cedric Moris (University of Potsdam, evaluating different extensions of the basic algorithm)

Bug reporting

In case of bugs and suggestions, use the issues link on top.

snha's People

Contributors

mittelmark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

snha's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.