glssoln: Generalized least-squares solver

glssolnR Documentation

Generalized least-squares solver

Description

Solves the generalized least squares problem.

Usage

glssoln(a, x, v, tol = sqrt(.Machine$double.eps))

Details

Given matrices a, x, v, glssoln computes y such that

(x-ay)^T v^{-1} (x-ay)

is minimized. This is accomplished by first computing the Choleski decomposition of v:

v=LL^T.

One then solves for y in the equation

L^{-1}ay=L^{-1}x.

This is accomplished by means of a singular-value decomposition of L^{-1} a.

The resulting y then satisfies

x=ay+e,

where the entries of e are the residuals.

Value

glssoln returns a list of two named components:

  • coeff is y as above.

  • residuals is e as above.


ouch documentation built on April 25, 2023, 9:10 a.m.

Related to glssoln in ouch...