Skip to content

HSquared.jlHow much is genetic?

The Julia engine behind hsquared: sparse pedigrees, REML, EBVs, and heritability extractors. Experimental 0.9.0 release — an engine, not the package you type a formula into.

HSquared.jl hex mark (PROPOSAL): deep teal hexagon, three hollow gold pedigree rings, h-squared. Not a settled brand.

Experimental 0.9.0 release — not production

Version number tracks covered capability, not maturity. Not in the Julia General registry. An earlier attempt (General PR #166969, v0.5.0) was closed. Install with Pkg.add(url = "https://github.com/itchyshin/HSquared.jl") only — do not use Pkg.add("HSquared") by name. public_covered_count is 7 (R-public; G10 multivariate + the explicit target = "genomic" 0.7 genomic-GREML route). 0.9.0 is an experimental GitHub release, not a Julia General registration.

I used language-model tools (Claude, Codex, and Cursor) on substantial parts of this engine: source, tests, and docs. I review the code I ship, and I am responsible for it. Tests and Documenter run in CI. This release is experimental 0.9.0. It is not a production engine and it is not version 1.0.

HSquared.jl is the Julia engine twin of the R package hsquared. This is not the package you type a formula into.

R users: start at hsquared(y ~ sex + age + animal(1 | id, pedigree = ped)), or the hsquared pkgdown site. That is the applied-user interface. These pages document the engine.

hsquared() here still throws. Lower-level fit_animal_model and fit_ai_reml exist as experimental engine paths, not the applied default. Choose a route before fitting, then read Validation status before treating any result as production-ready or reportable.

What works today ​

This repository is still early. It has experimental validation-scale engine utilities — pedigree checks, sparse Ainv, low-level REML and Henderson MME solves, and extractors for heritability, EBVs, and PEV. Those are engine utilities, not a public formula API and not a production sparse pipeline. Engine covered rows are not R-public covered. See Validation status for the live ladder; do not read this page as a capability dump.

Install ​

Needs Julia 1.10 or newer (Project.toml compat). HSquared is not in the Julia General registry. Do not use Pkg.add("HSquared") by name.

julia
using Pkg
Pkg.add(url = "https://github.com/itchyshin/HSquared.jl")

For the R package hsquared, clone this repository instead of Pkg.add and run Pkg.instantiate() in the clone. Point HSQUARED_JULIA_PROJECT at that clone.

First engine utility ​

julia
using HSquared

ped = normalize_pedigree(
    ["calf", "sire", "dam"],
    ["sire", "0", "0"],
    ["dam", "0", "0"],
)

ped.ids
3-element Vector{String}:
 "sire"
 "dam"
 "calf"
julia
Ainv = pedigree_inverse(ped)
Matrix(Ainv)
3×3 Matrix{Float64}:
  1.5   0.5  -1.0
  0.5   1.5  -1.0
 -1.0  -1.0   2.0

Twin boundary ​

  • hsquared is the R-facing package identity: formulas, validation, user documentation, S3 methods, plotting, and bridge calls.

  • HSquared.jl is the computational engine: sparse relationship matrices, likelihoods, solvers, EBVs, G matrices, and low-level diagnostics.

The R package can describe planned syntax, but public executable examples must not claim model fitting until the Julia engine implements and validates it. public_covered_count is 7 and counts the R-public covered surface only.

Continue by task ​

  1. Get started with an engine utility, or use hsquared for the applied formula.
  2. Choose a model and read its scope before fitting.
  3. Fit with the route's explicit engine controls.
  4. Diagnose the route before extracting an estimate.
  5. Report only the point-estimate claim the route supports.

The progression and evidence page separates this history from release status. Mission control is a developer dashboard, not a first-click applied path.

For a side-by-side map of pkgdown articles vs these pages, see Twin boundary: documentation map.