<< ols2 Single equation regressions ols_cons >>

Grocer >> Single equation regressions > ols2_cons

ols2_cons

constrained ordinary least squares

CALLING SEQUENCE

rols=ols2_cons(y,x,R,r)

PARAMETERS

Input

* y = dependent variable vector (nobs x 1)

* x = independent variables matrix (nobs x nvar)

* R = a (nc x k) matrix

* r = a (nc x 1) vector

 

Output

* rols = a results tlist with

  - rols('meth') = 'constrained ols'

  - rols('y') = y data vector

  - rols('x') = x data matrix

  - rols('nobs') = # observations

  - rols('nvar') = # variables

  - rols('beta') = bhat

  - rols('yhat') = yhat

  - rols('resid') = residuals

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

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

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

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

  - rols('tstat') = t-stats

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

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

  - rols('condindex') = multicolinearity cond index

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

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

  - rols('R') = the R matrix in Rb=r

  - rols('r') = the r matrix in Rb=r

  - rols('rsqr') = rsquared

  - rols('rbar') = rbar-squared

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

  - rols('pvaluef') = its significance level

DESCRIPTION

The low-level function that provides the constrained ordinary least squares, when the constraint takes the form Rb=r. Endogenous variable y and r in 'Rb=r' must be given in a vector form and x and R in 'Rb=r' in a matrix form. The programm does not display the results, but they can be found in the output results tlist.

EXAMPLE

load(GROCERDIR+'/macros/grocer/db/bdhenderic.dat') ; bounds('1964q3','1989q2') ;[y,junk,x]=explouniv('delts(lm1-lp)',['delts(lp)','delts(lagts(1,lm1))',...
'delts(lagts(1,lp))','delts(lagts(1,ly))','rnet','lagts(1,lm1-lp-ly)','cte']);r=ols2_cons(y,x,[0 1 1 0 0 0 0 ; 0 1 0 1 0 0 0],[0;0])
// The example shows the estimation of Hendry and Ericsson (1991) model by imposing the constraints on
// delts(lagts(1,lm1)), 'delts(lagts(1,lp))' and 'delts(lagts(1,ly))' in order to obtain delts(lagts(1,lm1-ly-lp))
// (see help for ols_cons). Estimation results are stored in tlist r.

AUTHOR

Eric Dubois 2006

Report an issue
<< ols2 Single equation regressions ols_cons >>