Handle boundary and line-search fixed-effect inference

This commit is contained in:
2026-08-14 16:54:57 +08:00
parent 48ab77f9ab
commit 9033201948
10 changed files with 220 additions and 41 deletions

View File

@@ -13,9 +13,11 @@ struct FixedEffectHypothesis {
std::vector<double> rhs;
};
// Computes coefficient-wise tests and any supplied general linear hypotheses
// at an already fitted REML solution. Inputs must use the same (possibly GRM-
// rotated) coordinate system and phenotype scale as the supplied fit.
// Computes coefficient-wise tests and any supplied general linear hypotheses.
// At an interior or retained line-search iterate it uses the requested REML
// small-sample method. A sigma_g2=0 boundary fit is refitted and tested as
// ordinary least squares without a GRM term. Inputs must use the same
// orthogonally rotated coordinate system and phenotype scale as the fit.
[[nodiscard]] FixedEffectInferenceResult infer_fixed_effects_spectral(
const std::vector<double>& y_star, const ColMajorMatrix& x_star,
const std::vector<double>& eigenvalues, const RemlResult& fit,