Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Feasible generalized least squares

`coeff = fgls(X,y)`

`coeff = fgls(Tbl)`

`coeff = fgls(___,Name,Value)`

```
[coeff,se,EstCoeffCov]
= fgls(___)
```

returns
coefficient estimates (`coeff`

= fgls(`X`

,`y`

)`coeff`

) of multiple linear
regression models `y`

= `X`

*β* + *ε* using
feasible generalized least squares (FGLS) by first estimating the
covariance of the innovations process *ε*.

`NaN`

s in the data indicate missing values,
which `fgls`

removes using list-wise deletion. `fgls`

sets `Data`

= ```
[X
y]
```

, then it removes any row in `Data`

containing
at least one `NaN`

. This reduces the effective sample
size, and changes the time base of the series.

returns FGLS coefficient estimates (`coeff`

= fgls(`Tbl`

)`coeff`

), with
predictor data in the first `numPreds`

columns of
the tabular array, `Tbl`

, and response data in the
last column.

`fgls`

removes all missing values in `Tbl`

,
indicated by `NaN`

s, using list-wise deletion. In
other words, `fgls`

removes all rows in `Tbl`

containing
at least one `NaN`

. This reduces the effective sample
size, and changes the time base of the series.

uses
any of the input arguments in the previous syntaxes and additional
options specified by one or more `coeff`

= fgls(___,`Name,Value`

)`Name,Value`

pair
arguments.

For example, use `Name,Value`

pair arguments
to choose the innovations covariance model, number of iterations,
or to plot estimates after each iteration.

`[`

additionally returns a vector of
FGLS coefficient standard errors, `coeff`

,`se`

,`EstCoeffCov`

]
= fgls(___)`se`

= `sqrt(diag(EstCov))`

,
and the FGLS estimated coefficient covariance matrix (`EstCoeffCov`

).

To obtain standard generalized least squares (GLS) estimates:

To obtain WLS estimates, set the

`InnovCov0`

name-value pair argument to a vector of inverse weights (e.g., innovations variance estimates).In specific models and with repeated iterations, scale differences in the residuals might produce a badly conditioned estimated innovations covariance and induce numerical instability. If you set

`'resCond',true`

, then conditioning improves.

In the presence of nonspherical innovations, GLS produces efficient estimates relative to OLS, and consistent coefficient covariances, conditional on the innovations covariance. The degree to which

`fgls`

maintains these properties depends on the accuracy of both the model and estimation of the innovations covariance.Rather than estimate FGLS estimates the usual way,

`fgls`

uses methods that are faster and more stable, and are applicable to rank-deficient cases.Traditional FGLS methods, such as the Cochrane-Orcutt procedure, use low-order, autoregressive models. These methods, however, estimate parameters in the innovations covariance matrix using OLS, where

`fgls`

uses maximum likelihood estimation (MLE) [2].

[1] Cribari-Neto, F. "Asymptotic Inference
Under Heteroskedasticity of Unknown Form." *Computational
Statistics & Data Analysis*. Vol. 45, 2004, pp. 215–233.

[2] Hamilton, J. D. *Time Series
Analysis*. Princeton, NJ: Princeton University Press, 1994.

[3] Judge, G. G., W. E. Griffiths, R. C.
Hill, H. Lutkepohl, and T. C. Lee. *The Theory and Practice
of Econometrics*. New York, NY: John Wiley & Sons,
Inc., 1985.

[4] Kutner, M. H., C. J. Nachtsheim, J. Neter,
and W. Li. *Applied Linear Statistical Models*.
5th ed. New York: McGraw-Hill/Irwin, 2005.

[5] MacKinnon, J. G., and H. White. "Some
Heteroskedasticity-Consistent Covariance Matrix Estimators with Improved
Finite Sample Properties." *Journal of Econometrics*.
Vol. 29, 1985, pp. 305–325.

[6] White, H. "A Heteroskedasticity-Consistent
Covariance Matrix and a Direct Test for Heteroskedasticity." *Econometrica*.
Vol. 48, 1980, pp. 817–838.

`arma2ar`

| `fitlm`

| `hac`

| `lscov`

| `regARIMA`

- Classical Model Misspecification Tests
- Time Series Regression I: Linear Models
- Time Series Regression VI: Residual Diagnostics
- Time Series Regression X: Generalized Least Squares and HAC Estimators
- Autocorrelation and Partial Autocorrelation
- Engle’s ARCH Test
- Nonspherical Models
- Time Series Regression Models

Was this topic helpful?