<< dynfore Single equation regressions gls1 >>

Grocer >> Single equation regressions > gls

gls

Generalized least squares

CALLING SEQUENCE

[rgls]=gls(omega,namey0,arg1,...,argn)

PARAMETERS

Input

* omega = a (nobs x nobs) variance matrix

* namey0 = a time series, a real (n x 1) vector or a string equal to the name of a time series or a (n x 1) real vector between quotes

* arg1,...,argn = arguments which can be:

   . a time series

   . a real (nxp) vector

   . a string equal to the name of a time series or a (nxp) real vector between quotes

   . the string 'noprint' if the user doesn't want to print the results of the regression

   . 'dropna' if the user wants to remove the NA values from the data

   . 'saturate(x)' if the user wants to test breaks with impulse indicator saturation at the size x

   . 'noprint' if the user does not want to print the estimation results

Output

* rgls = a results tlist with

   - rgls('meth') = 'gls' or 'saturated gls'

   - rgls('y') = y data vector

   - rgls('x') = x data matrix

   - rgls('nobs') = # observations

   - rgls('nvar') = # variables

   - rgls('beta') = bhat

   - rgls('yhat') = yhat

   - rgls('resid') = residuals

   - rgls('vcovar') = estimated variance-covariance matrix of beta

   - rgls('sige') = estimated variance of the residuals

   - rgls('sigu') = sum of squared residuals

   - rgls('ser') = standard error of the regression

   - rgls('tstat') = t-stats

   - rgls('pvalue') = pvalue of the betas

   - rgls('dw') = Durbin-Watson Statistic

   - rgls('condindex') = multicolinearity cond index

   - rgls('prescte') = boolean indicating the presence or absence of a constant in the regression

   - rgls('llike') = the log-likelihood

   - rgls('aic')= the Akaike information criterion

   - rgls('bic')= the Schwarz information criterion

   - rgls('hq')= the Hannan-Quinn information criterion

   - rgls('rsqr') = rsquared

   - rgls('rbar') = rbar-squared

   - rgls('f') = F-stat for the nullity of coefficients other than the constant

   - rgls('pvaluef') = its significance level

   - rgls('like') = log-likelihood of the regression

   - rgls('prests') = boolean indicating the presence or absence of a time series in the regression

   - rgls('namey') = name of the y variable

   - rgls('namex') = name of the x variables

   - rgls('dropna') = boolean indicating if NAs have been dropped

   - rgls('bounds') = if there is a timeseries in the regression, the bounds of the regression

   - rgls('nonna') = vector indicating position of non-NAs

   - rgls('saturation significance level') = significance level used to keep the dummies

   - rgls('significant dummies') = the remaining dummies after testing

DESCRIPTION

Preforms a generalized least-squares regression.

EXAMPLE

global GROCERDIR ;
load(GROCERDIR+'\data\strongx.dat')
r= gls(diag(sd .^2),'crossx','energy','const')

AUTHOR

Éric Dubois 2026

Report an issue
<< dynfore Single equation regressions gls1 >>