Name
olsc0 — Cochrane-Orcutt estimation of an autocorrelated model
CALLING SEQUENCE
[rho,bet,iterout]=olsc0(y,x,maxit,crit)
PARAMETERS
- Input
y = real (nx1) vector of an endogenous variable
x = real (nxk) vector of an exogenous variable
maxit = a scalar, the maximum # of authorized iterations
crit = a scalar, the convergence criterionused to assess if the difference between successive values of the autocorrelation coefficient is significant
- Output
rho = the autocorrelation coefficient of the residuals
bet = estimated parameter
iterout = a (niter x 3) matrix giving for each iteration the estimated rho, the convergence criterion and its number
DESCRIPTION
Computes Cochrane-Orcutt ols regression for AR1 errors. This is a more constrainted and quicker version than olsc: endogenous variables and exogenous ones are given in a matrix form; the maximum number of iterations and the criterion must be given; only rho, beat and their successive values during iterations are given. No result is displayed on screen.
EXAMPLE
x=grand(15,3,'nor',0,1)
y=x*ones(3,1)+autocum(grand(15,1,'nor',0,1),0.8)
[rho,b,it]=olsc0(y,x,100,%eps^(1/3))
//In this example, the maximum # of iterations is set to 100 and the convergence criterion to %eps^(1/3).