Learn R Programming

QualityMeasure (version 2.0.1)

calcResamplingIUR: Calculate reliability using resampling inter-unit reliability method

Description

This function estimates reliability using the resampling inter-unit reliability method described in He et al. 2018.

Usage

calcResamplingIUR(
  df = NULL,
  model = NULL,
  entity = "entity",
  y = "y",
  ctrPerf = controlPerf(),
  ctrRel = controlRel()
)

Value

A list containing:

  • entity: list of entities

  • n: entity sample sizes

  • var.b: between-entity variance

  • var.w: within-entity variance

  • var.total: total variance

  • IUR: entity-level reliability

Arguments

df

observation-level data; if null, will use the dataframe from the model object

model

model; if null, will use an unadjusted model

entity

data column containing the accountable entity identifier

y

data column containing the outcome variable

ctrPerf

parameters to control performance measure calculation

ctrRel

parameters to control reliability estimation

Author

Kenneth Nieser (nieser@stanford.edu)

Details

In the current version, this function assumes that the measure is a simple mean of outcome values within each entity. However, this method is more flexible as described in He et al. 2018.

References

He K, Kalbfleisch JD, Yang Y, Fei Z. Inter unit reliability for nonlinear models. Stat Med. 2019 Feb 28;38(5):844-854.

Examples

Run this code
# Simulate data
df <- simulateData(n.entity = 50, n.obs = 100, mu = .2, r = .7)

# Calculate reliability
out <- calcResamplingIUR(df = df, entity = 'entity', y = 'y', ctrRel = controlRel(n.resamples = 10))
out$IUR

Run the code above in your browser using DataLab