torch_openreml.post.var_blue

torch_openreml.post.var_blue(x, v)[source]

Compute the variances of the BLUE of the fixed effects.

This is the diagonal of cov_blue(),

\[\operatorname{Var}(\hat{\beta}_j) = \left[\left(\symbf{X}^\top\symbf{V}^{-1}\symbf{X}\right)^{-1} \right]_{jj},\]

the sampling variance of each fixed-effect estimate.

Parameters:
  • 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:

BLUE variances of shape (p,).

Return type:

torch.Tensor