MyNixOS website logo
Description

Intracluster Correlation Coefficient (ICC) in Clustered Categorical Data.

Assists in generating categorical clustered outcome data, estimating the Intracluster Correlation Coefficient (ICC) for nominal or ordinal data with 2+ categories under the resampling and method of moments (MoM) methods, with confidence intervals.

iccmult

Codecov testcoverage

The goal of iccmult is to estimate the intracluster correlation coefficient (ICC) of clustered categorical response data. It provides two estimation methods, a resampling based estimator and the method of moments estimator. These are obtained by specifying a method in the function iccmulti::iccmult(). This package also includes a function to generate simulated clustered categorical response data: iccmulti::rccat().

Installation

You can install iccmult from within R or RStudio with:

install.packages("iccmult")

Alternatively, install the package from GitHub with:

# install.packages("pak")
pak::pak("ncs14/iccmult")

Example

This is a basic example which shows you how to generate clustered categorical response data. The response probabilities must sum 1 and the desired ICC must be a value between 0 and 1. The number of clusters is set to 20 and each cluster is of size 25. The output of rccat is a two column data frame of a cluster identifier and a categorical response vector.

library(iccmult)
clustdat3 <- rccat(rho=0.25, prop=c(0.2,0.3,0.5), noc=20, csize=25)

The iccmulti() function is called as follows to estimate the ICC on the resulting data frame. The function expects two variables: a cluster identifier and the categorical response vector. The call below requests both the resampling and the moments estimates.

iccclust <- iccmulti(cid, y, clustdat3, method=c("rm","mom"))
#> Warning in iccmulti(cid, y, clustdat3, method = c("rm", "mom")): ICC not
#> estimable by 'Resampling' method for at least one categorical calculation
#> Warning in iccmulti(cid, y, clustdat3, method = c("rm", "mom")): Resampling
#> based confidence interval for ICC is not estimable for at least one categorical
#> calculation
#> Warning in iccmulti(cid, y, clustdat3, method = c("rm", "mom")): Resampling
#> based confidence interval for categorical ICC is not estimable
#> Warning in iccmulti(cid, y, clustdat3, method = c("rm", "mom")): Categorical
#> ICC not estimable by 'Resampling' method

The result is a list of length two, each component holding the estimated ICC, se(ICC), and confidence interval bounds from each estimation method.

Metadata

Version

1.0.1

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • 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