

<!-- README.md is generated from README.Rmd. Please edit that file -->

# iccbeta: Intraclass Correlation

<!-- badges: start -->

[![R-CMD-check](https://github.com/tmsalab/iccbeta/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tmsalab/iccbeta/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

A function and vignettes for computing an intraclass correlation
described in Aguinis & Culpepper (in press). `iccbeta` quantifies the
share of variance in a dependent variable that is attributed to group
heterogeneity in slopes.

## Installation

You can install `iccbeta` from CRAN using:

``` r
install.packages("iccbeta")
```

Or, you can be on the cutting-edge development version on GitHub using:

``` r
if(!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("tmsalab/iccbeta")
```

## Usage

To use the `iccbeta` package, load it into *R* using:

``` r
library("iccbeta")
```

From there, calling the `icc_beta()` function with either a `lmer()`
model object or the desired individual components will compute the
intraclass correlation:

``` r
# Automatically calculate icc from model
results_model = icc_beta(<lmer-model>)

# Calculate icc from individual terms.
results_component = icc_beta(X, l2id, T, vy)
```

## Authors

Steven Andrew Culpepper and Herman Aguinis

## Citing the `iccbeta` package

To ensure future development of the package, please cite `iccbeta`
package if used during an analysis or simulation studies. Citation
information for the package may be acquired by using in *R*:

``` r
citation("iccbeta")
```

## License

GPL (\>= 2)
