Name

ar1_grad — gradient for ols model with AR1 errors

CALLING SEQUENCE

[grad]=ar1_grad(param,y,x)

PARAMETERS

Input

• param = parameter vector (k x 1)

• y = dependent variable vector (n x 1)

• x = explanatory variables matrix (n x m)

Output

• grad = the gradient

DESCRIPTION

Evaluates minus the gradient of the log-likelihood for ols model with AR1 errors. Param(1,1) contains rho parameter.

EXAMPLE

g=ar1_grad(parm,grocer_y,grocer_x)
 
This example is taken from olsar1. 

               

AUTHOR

Eric Dubois 2002