I sent a private reply. As an outline has been posted, I'll point out
publicly that there is code to do this in the on-line answers to V&R2. It
uses the eigen decomposition to find T, which is a little slower then
Choleski, but stabler with ill-conditioned T. Also, most commonly GLS is
given in terms of a weight matrix W, where W = (sigma^2 * V)^{-1}, and
that occurs naturally in several applications. With an eigendecomposition
the extra code needed to allow W or V to be specified is trivial (and our
lm.gls does so).
As a side point, if the sigma^2 is known (which is how I interpret the
question) many of the lm methods (e.g. summary) will use s^2, so will
need alteration.
-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595