MyNixOS website logo
Description

Creating Correlation Networks using St. Nicolas House Analysis.

Create correlation networks using St. Nicolas House Analysis ('SNHA'). The package can be used for visualizing multivariate data similar to Principal Component Analysis or Multidimensional Scaling using a ranking approach. In contrast to 'MDS' and 'PCA', 'SNHA' uses a network approach to explore interacting variables. For details see 'Hermanussen et. al. 2021', <doi:10.3390/ijerph18041741>.

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.

Installation

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.

...

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.

Bug reporting

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

Metadata

Version

0.1.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows