Skip to contents

[Experimental]

Usage

variance_component_standard_errors(object, ...)

heritability_standard_error(object, ...)

Arguments

object

A fitted model object.

...

Reserved for future arguments.

Value

variance_component_standard_errors() returns a data frame with component and se. heritability_standard_error() returns a one-row data frame with term and se, matching heritability() so the two merge on term (hsquared#236). Only for hsquared_fit objects that contain them. The fit object may still store heritability_se as a bare numeric internally; this extractor is the public shape.

Details

variance_component_standard_errors() and heritability_standard_error() return experimental large-sample (delta-method) standard errors derived from the REML average-information matrix on the default univariate Gaussian animal-model route. Repeatability, two-effect, and multivariate SEs use the observed information from a central finite-difference Hessian (fd_step = 1e-4) instead; see the information-matrix table on Can I fit and report this?. They are available only when an hsquared_fit object contains them; the default Gaussian animal-model fit populates them from the engine when a local Julia engine is present and the AI matrix is invertible. When the engine could not compute them, hsquared() warns once at fit time and keeps the engine's reason in attr(fit, "bridge_errors"), a character vector named by the engine function that failed (HSquared.jl#351); the field is then absent, not NA.

These mirror the engine row V1-HERIT-CI (partial): asymptotic, REML-only, and unreliable at small n or near a variance-component boundary. A non-converged or boundary fit still returns the engine SEs when they are present: the extractors warn and keep the numbers for inspection. Those SEs must not be reported. summary() omits the printed SE block when the fit did not converge or is at a variance-component boundary. The engine omits the fields only when it could not compute them (for example when the AI matrix is not invertible), not merely because a component sits near zero. The Wald SE is not valid when additive variance is near 0; V_A = 0 is on the edge of the parameter space, so the usual normal approximation does not apply. The likelihood-ratio test of V_A = 0 uses a 50:50 mixture of chi^2_0 and chi^2_1 (Self and Liang 1987; Stram and Lee 1994). R does not run that test; Julia HSquared.nested_lrt(..., df = 1, boundary_df = 1) already does. The 2000-rep C1 coverage confirm (job 47925485) measured the additive-variance delta/Wald interval implied by these SEs to under-cover (0.897 at nominal 0.95, h²=0.5), placing it at experimental-only: the SE is a point-estimate reference only, not a calibrated and not a conservative interval. (A profile additive-variance interval is directional-conservative by the same run — including the h²=0.3 cell 0.963 — but is not surfaced by this delta-method extractor. Additive-variance bootstrap worst-cell Ĉ 0.918 is the same DC mild-under branch as h² bootstrap.) Not coverage-calibrated, not a validated capability.