<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ols</title>
</head>
<body bgcolor="#FFFFFF">
<center>Grocer Single Equation Function</center>
<H3>
<font color="blue">NAME</font></H3>
ols - ordinary least squares<br>
<H3>
<font color="blue">CALLING SEQUENCE</font></H3>
[rols]=ols(namey,arg1,...,argn)
<br><H3>
<font color="blue">PARAMETERS</font></H3>
<H4>
<font color="red"> Input</font></H4>
<ul>
<li>
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</li>
<li>
argi = arguments which can be:</li>
<br>- a time series
<br>- a real (nx1) vector
<br>- a real (nxk) matrix
<br>- a string equal to the name of a time series or a (nxk) real vector or matrix between quotes
<br>- a list of such elemnts
<br>- the string 'noprint' if the user doesn't want to display the results of the regression
</ul>
<H4>
<font color="red"> Output</font></H4>
<ul>
<li>
rols = a results tlist with</li>
<br>- rols('meth') = 'ols'
<br>- rols('y') = y data vector
<br>- rols('x') = x data matrix
<br>- rols('nobs') = # observations
<br>- rols('nvar') = # variables
<br>- rols('beta') = bhat
<br>- rols('yhat') = yhat
<br>- rols('resid') = residuals
<br>- rols('vcovar') = estimated variance-covariance matrix of beta
<br>- rols('sige') = estimated variance of the residuals
<br>- rols('sigu') = sum of squared residuals
<br>- rols('ser') = standard error of the regression
<br>- rols('tstat') = t-stats
<br>- rols('pvalue') = pvalue of the betas
<br>- rols('dw') = Durbin-Watson Statistic
<br>- rols('condindex') = multicolinearity cond index
<br>- rols('prescte') = boolean indicating the presence or absence of a constant in the regression
<br>- rols('rsqr') = rsquared
<br>- rols('rbar') = rbar-squared
<br>- rols('f') = F-stat for the nullity of coefficients other than the constant
<br>- rols('pvaluef') = its significance level
<br>- rols('prests') = boolean indicating the presence or absence of a time series in the regression
<br>- rols('namey') = name of the y variable
<br>- rols('namex') = name of the x variables
<br>- rols('bounds') = if there is a timeseries in the regression, the bounds of the regression
<br></ul>
<H3>
<font color="blue">DESCRIPTION</font></H3>
The most general GROCER function performing least-squares regression. Endogenous variable must be given first, as a vector, a ts, between quotes (if the user wants to keep the name of the variable in the tlist result and for the printings) or not. Exogenous variables are given after, in one of the formats authorized for the endogenous one, or in matrix format. The program displays on screen various results (coefficients, tstat, Rē, Durbin and Watson,...) except if the user has entered the argument 'noprint' anywhere after the first argument. <br>
<H3>
<font color="blue">EXAMPLES</font></H3>
1) bounds('1964q3','1989q2'); rols=ols('del(lm1-lp)','del(lp)','del(lagts(1,lm1-lp-ly))','rnet', 'lagts(1,lm1-lp-ly)', 'cte');
<br>2) bounds('1964q3','1989q2'); rols=ols('del(lm1-lp)',['del(lp)','del(lagts(1,lm1-lp-ly))','rnet', 'lagts(1,lm1-lp-ly)','cte']);
<br>3) bounds('1964q3','1989q2'); rols=ols(del(lm1-lp),del(lp),del(lagts(1,lm1-lp-ly)),rnet, lagts(1,lm1-lp-ly),cte);
<br>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');
<br>5) y=grand(100,1, 'nor',0,1); x=grand(100,4, 'nor',0,1);ols('y', 'x')
<br>6) ols(y, x);
<p>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'.
<br>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)).
<br>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.
<br><H3>
<font color="blue">AUTHOR</font></H3>
Eric Dubois 2002<br>