ICC {rewie}R Documentation

Computes intraclass correlation coefficient (ICC)

Description

Calculates the ICC for the idiosyncratic, within, and between variation. Calculates the ICC for total variation and for within variation.

Usage

ICC(y,timevar,csvar,df)

Arguments

y

is the name of the response vector provided as a character string.

timevar

is a character string providing the name of the time indicator variable.

csvar

is a character string providing the name of the cross-section indicator variable.

df

is a dataframe containing y, timevar, and csvar

Details

Calculates ICC foreach level of variation.

Value

Returns the ICC results in a list.

ICC.mat

is the matrix of ICCs and variance components for each level of variation.

within.ICC.mat

is the matrix of ICCs and variance components only examining the within variation.

Author(s)

Scott Duxbury, Assistant Professor of Sociology at University of North Carolina, Chapel Hill

Examples



library(plm)
library(lme4)


##not run
data("Crime")


ICC("lcrmrte",csvar="county", timevar="year",Crime)




[Package rewie version 0.1.0 Index]