Hello…I’m trying to write a script computing recursive residuals. You’re probably familiar with the concept how to obtain such a residual: after estimating model for (n+1) observations (with dummy variable equals 1 for observation number (n+1)) t-value for dummy variable is multiplied by standard error of residuals. Unfortunately something is wrong…

Script is presented below (data file is attached):

 

matrix D=I(21)

loop for i=5..21

smpl 1 $i

    series d$i=D[,$i]

    print d$i

    ols c_2006 const y_2006 r_2006 d$i

    t$i=$coeff(d$i)/$stderr(d$i)

    r$i=t$i*$sigma

print t$i r$i

endloop   

 

Best wishes,

Mariusz

Poland