STK_PARAM_GLS computes a generalised least squares estimate

 CALL: BETA = stk_param_gls (MODEL, XI, ZI)

   computes a generalised least squares estimate BETA of the vector of
   coefficients for the linear part of MODEL, where XI and ZI stand for
   the evaluation points and observed responses, respectively.

 CALL: [BETA, SIGMA2] = stk_param_gls (MODEL, XI, ZI)

   also returns the associated unbiased estimate SIGMA2 of sigma^2, assu-
   ming that the actual covariance matrix of the Gaussian process part of
   the model is sigma^2 K, with K the covariance matrix built from MODEL.

   SIGMA2 is actually the "best" unbiased estimate of sigma^2 :

                 1
      SIGMA2 = ----- * || ZI - P BETA ||^2_{K^{-1}}
               n - r

   where n is the number of observations, r the length of BETA, P the
   design matrix for the linear part of the model, and || . ||_{K^{-1}}
   the norm associated to the positive definite matrix K^{-1}. It is the
   best estimate with respect to the quadratic risk, among all unbiased
   estimates which are quadratic in the residuals.

Package: stk