torch_openreml.blue¶
- torch_openreml.blue(y, x, v)[source]¶
Compute the best linear unbiased estimator (BLUE) of the fixed effects.
Solves for \(\hat{\boldsymbol{\beta}}\) via generalised least squares:
\[\hat{\boldsymbol{\beta}} = (\symbf{X}^\top \symbf{V}^{-1} \symbf{X})^{-1} \symbf{X}^\top \symbf{V}^{-1} \symbf{y}\]- Parameters:
y (torch.Tensor) – Response vector of shape
(n,).x (torch.Tensor) – Fixed-effect design matrix of shape
(n, p).v (torch.Tensor) – Marginal covariance matrix of shape
(n, n), e.g. \(\symbf{V}(\boldsymbol{\theta})\) evaluated at fitted covariance parameters.
- Returns:
- Coefficient estimate \(\hat{\boldsymbol{\beta}}\)
of shape
(p,).
- Return type:
torch.Tensor