Profile-likelihood heritability estimation for family cohort studies β no SOLAR required.
β οΈ Ritable is in early development and has not been formally tested. The API may change without notice, estimation results have not yet been validated against a reference implementation such as SOLAR Eclipse, and the package has not undergone peer review. Use with caution and verify outputs independently before using in any research context.
R-itable (library(Ritable)) estimates narrow-sense heritability (hΒ²) for
quantitative traits in pedigree-based family cohort studies. It implements a
profile-likelihood variance-components approach equivalent to SOLAR Eclipse β
without any proprietary dependencies, compiled code, or external binaries.
Built for neuroimaging and biomedical cohorts where you need to run heritability over dozens of traits across multiple covariate models and get results you can trace back to first principles.
- π¬ Profile-likelihood VC estimator β eigendecomposition of the GRM, 1-D optimisation, exact LRT with one-sided ΟΒ²(1) boundary correction (matching SOLAR).
- π Profile-likelihood CIs β not Wald Β±1.96 SE; proper asymmetric intervals
via
uniroot(). - π INT transformation β inverse-normal transform applied internally;
also exported as
int_transform()for use in other pipelines. - π¦ Batch mode β
herit_batch()iterates over traits Γ covariate models and returns a tidy data frame, ready for tables and figures. - π² Forest plots β
plot_forest()for immediate visualisation of batch output (requires ggplot2). - π§© Minimal dependencies β core functions require only base R,
kinship2,rlang, andcli.
R-itable/
βββ R/
β βββ itable-package.R # package-level docs
β βββ build_grm.R # build additive GRM from pedigree
β βββ int_transform.R # rank-based inverse-normal transform
β βββ herit_vc.R # single-trait VC estimator
β βββ herit_batch.R # batch wrapper
β βββ plot_forest.R # ggplot2 forest plot
βββ tests/testthat/
β βββ helper-fixtures.R # shared synthetic pedigree/data
β βββ test-build_grm.R
β βββ test-int_transform.R
β βββ test-herit_vc.R
β βββ test-herit_batch.R
βββ vignettes/
β βββ getting-started.Rmd
βββ data-raw/
β βββ prepare_data.R
βββ DESCRIPTION
βββ NAMESPACE
βββ NEWS.md
install.packages(c("kinship2", "rlang", "cli"))
# For plotting:
install.packages("ggplot2")# From GitHub (recommended while pre-CRAN)
remotes::install_github("circadia-bio/R-itable")library(Ritable)
# 1. Build GRM from pedigree
A <- build_grm(my_pedigree, study_ids = my_data$IID)
# 2. Single trait
herit_vc("bmi", grm = A, data = my_data, covs = c("age", "sex"))
# 3. Many traits x models -> tidy data frame
res <- herit_batch(
traits = c("bmi", "hdl", "systolic_bp"),
grm = A,
data = my_data,
covs_list = list(
unadj = NULL,
cov1 = c("age", "sex"),
cov2 = c("age", "sex", "age2")
)
)
# 4. Forest plot
plot_forest(res, model_filter = "cov2")For a full walkthrough see vignette("getting-started", package = "Ritable").
| Package | Role |
|---|---|
kinship2 |
Pedigree object and kinship matrix |
rlang |
Error/warning handling, tidy eval |
cli |
Progress bars and formatted messages |
ggplot2 (Suggests) |
plot_forest() |
| Role | Name | Affiliation |
|---|---|---|
| Author & maintainer | Lucas FranΓ§a | Northumbria University / Circadia Lab |
| Author | Mario Leocadio-Miguel | Northumbria University / Circadia Lab |
- π§ͺ ptestR β permutation tests for R
- π SleepDiaries β sleep diary PWA
- β‘ ACTT_validation_study β actigraphy validation
- π¬ circadia-bio β the Circadia Lab GitHub organisation
Released under the MIT License.
Copyright Β© Circadia Lab, 2026