
Per-trait repeatability with confidence intervals
Source:R/extract-repeatability.R
extract_repeatability.RdReturns the per-trait repeatability
\(R_t = \sigma^2_{B,t} / (\sigma^2_{B,t} + \sigma^2_{W,t})\) for a
fitted gllvmTMB_multi model with both unique(0 + trait | <unit>)
and unique(0 + trait | <obs>) terms. Also known as the
intraclass correlation coefficient (ICC) at the unit level.
Usage
extract_repeatability(
fit,
level = 0.95,
method = c("profile", "wald", "bootstrap"),
nsim = 500L,
seed = NULL
)Arguments
- fit
A
gllvmTMB_multifit returned bygllvmTMB.- level
Confidence level. Default 0.95.
- method
One of
"profile"(default),"wald","bootstrap".- nsim
Number of bootstrap replicates when
method = "bootstrap". Default 500.- seed
Optional RNG seed for the bootstrap.
Method choice
"profile": profile-likelihood CI via the linear contrast \(2(\theta_B - \theta_W)\) in TMB::tmbprofile(). Fast and accurate."wald": Gaussian-approximation CI via the delta method onplogis(2*(theta_B - theta_W))."bootstrap": parametric bootstrap viabootstrap_Sigma().
References
Nakagawa, S. & Schielzeth, H. (2010) Repeatability for Gaussian and non-Gaussian data: a practical guide for biologists. Biological Reviews 85, 935-956. doi:10.1111/j.1469-185X.2010.00141.x