ols — ordinary least squares
[rols]=ols(namey,arg1, ,argn)
namey = a time series, a real (nx1) vector or a string equal to the name of a time series or a (nx1) real vector between quotes
argi = arguments which can be:
- a time series
- a real (nx1) vector
- a real (nxk) matrix
- a string equal to the name of a time series or a (nxk) real vector or matrix between quotes
- a list of such elemnts
- the string 'noprint' if the user doesn't want to display the results of the regression
rols = a results tlist with
- rols('meth') = '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('rsqr') = rsquared
- rols('rbar') = rbar-squared
- rols('f') = F-stat for the nullity of coefficients other than the constant
- rols('pvaluef') = its significance level
- rols('prests') = boolean indicating the presence or absence of a time series in the regression
- rols('namey') = name of the y variable
- rols('namex') = name of the x variables
- rols('bounds') = if there is a timeseries in the regression, the bounds of the regression
1) bounds('1964q3','1989q2'); rols=ols('del(lm1-lp)','del(lp)','del(lagts(1,lm1-lp-ly))','rnet', 'lagts(1,lm1-lp-ly)', 'cte'); 2) bounds('1964q3','1989q2'); rols=ols('del(lm1-lp)',['del(lp)','del(lagts(1,lm1-lp-ly))','rnet', 'lagts(1,lm1-lp-ly)','cte']); 3) bounds('1964q3','1989q2'); rols=ols(del(lm1-lp),del(lp),del(lagts(1,lm1-lp-ly)),rnet, lagts(1,lm1-lp-ly),cte); 4) bounds('1964q3','1989q2'); rols=ols(del(lm1-lp),del(lp),del(lagts(1,lm1-lp-ly)),rnet, lagts(1,lm1-lp-ly),cte, 'noprint'); 5) y=grand(100,1, 'nor',0,1); x=grand(100,4, 'nor',0,1);ols('y', 'x') 6) ols(y, x); Examples 1 to 3 provide the same results except that the third example does not keep the names of the variables, which are named 'endogenous', 'exogenous # 1', 'exogenous # 2', 'exogenous # 3', 'exogenous # 4', 'exogenous # 5'. Example 4 gives exactly the same tlist result as example 3, but the results are not displayed on screen (this can be done later by typing prtuniv(rols)). Examples 5 and 6 give the same results, except that the endogenous variables is named 'y' in example 5 and 'endogenous' in example 6 and the exogenous variables 'x_1', 'x_2', 'x_3', 'x_4' in example 5 and 'exogenous # 1', 'exogenous # 2', 'exogenous # 3', 'exogenous # 4' in example 6.