Skip to contents

Compute implied level-2 random intercept SD from ICC and outcome scale

Usage

spec_implied_intercept_sd(spec)

Arguments

spec

A spec_ir object with hierarchy$levels == 2L.

Value

Numeric scalar random intercept standard deviation, or 0 for 1-level specs.

Examples

spec <- new_spec_ir(
  design_type = "multilevel_sim",
  hierarchy = list(levels = 2L, n_clusters = 40L, cluster_size = 20L, icc = 0.2)
)
spec_implied_intercept_sd(spec)
#> [1] 0.5