Post-hoc estimationΒΆ

Post-hoc estimation for linear mixed models fitted by REML, operating on tensors: best linear unbiased estimation (BLUE) of the fixed effects, best linear unbiased prediction (BLUP) of the random effects, their sampling covariance and variance matrices, and marginal and conditional fitted values and residuals.

Routines that factorise V add a fixed numerical ridge 1e-6 * I before the factorisation. Pass an already-regularised V if a different ridge is required.

torch_openreml.post.blue(y, x, v)

Compute the best linear unbiased estimator (BLUE) of the fixed effects.

torch_openreml.post.cov_blue(x, v)

Compute the covariance matrix of the BLUE of the fixed effects.

torch_openreml.post.var_blue(x, v)

Compute the variances of the BLUE of the fixed effects.

torch_openreml.post.blup(y, x, z, g, v)

Compute the best linear unbiased predictor (BLUP) of the random effects.

torch_openreml.post.cov_blup(x, z, g, v)

Compute the covariance matrix of the BLUPs.

torch_openreml.post.var_blup(x, z, g, v)

Compute the variances of the BLUPs.

torch_openreml.post.marginal_predict(y, x, v)

Compute marginal fitted values from fixed effects only.

torch_openreml.post.marginal_residual(y, x, v)

Compute marginal residuals from fixed effects only.

torch_openreml.post.predict(y, x, z, g, v)

Compute conditional fitted values including random effects.

torch_openreml.post.residual(y, x, z, g, v)

Compute conditional residuals including random effects.

torch_openreml.post.loglik(y, x, v)

Evaluate the REML log-likelihood.