<< gls Single equation regressions hwhite >>

Grocer >> Single equation regressions > gls1

gls1

Generalized least squares

CALLING SEQUENCE

rgls=gls1(omega,y,x)

PARAMETERS

Input

* omega = a (nobs x nobs) variance matrix

* y = dependent variable vector (nobs x 1)

* x = independent variables matrix (nobs x nvar)

Output

* rgls = a tlist with

   - rgls('meth') = 'gls'

   - rgls('y') = y data vector

   - rgls('x') = x data matrix

   - rgls('nobs') = nobs

   - rgls('nvar') = nvars

   - rgls('beta') = bhat

   - rgls('yhat') = yhat

   - rgls('resid') = residuals

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

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

   - rgls('sige') = estimated variance of the 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 generalized regression

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

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

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

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

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

   - rgls('hq')= the Hannan-Quinn 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

DESCRIPTION

Generalized least-squares regression when variables looks like in the textbook.

EXAMPLE

global GROCERDIR ;
load(GROCERDIR+'\data\strongx.dat')
r= gls1(diag(sd .^2),crossx,[energy,ones(10,1)])

AUTHOR

Éric Dubois 2026

Report an issue
<< gls Single equation regressions hwhite >>