Page 2 of 2
Re: Extracting the residual series from MGARCH-M model
Posted: Wed Jun 17, 2015 11:12 am
by TomDoan
econo wrote:TomDoan wrote:it won't because RVECTORS produces a SERIES[VECTOR] which COPY doesn't handle[/i].
to export errors vector, I used this code
EWISE rd(t) = X(t)
## SX11. Identifier X is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>EWISE rd(t) = X(<<<<
still doesn't work

1. What's X?
2. Isn't
RD what's being defined by GARCH?
Re: Extracting the residual series from MGARCH-M model
Posted: Wed Jun 17, 2015 11:44 am
by econo
I used this code and just want to export residuals, then in R-program calculate standardized residuals!
Code: Select all
garch(p=1,q=1,model=var1,mv=CC,variance=varma,pmethod=simplex,piters=5,rvectors=rd,hmatrices=hh, MVHSERIES=VarmaHmatrix ) gstart gend O 22
EWISE X(t)=rd(t)
## SX11. Identifier X is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>EWISE X(<<<<
Moreover, I used this code as you said
Code: Select all
garch(p=1,q=1,model=var1,mv=CC,variance=varma,pmethod=simplex,piters=5,rvectors=rd,hmatrices=hh, MVHSERIES=VarmaHmatrix )
dec vect[series] zu(%nvar)
do time=%regstart(),%regend()
compute %pt(zu,time,%solve(%decomp(hh(time)),rd(time)))
end do time
@mvqstat(lags=40)
# zu
the second code calculates standardized residuals(?!) but this results (with RATS 8.0) differ from the ones I calculated with RATS 9.0 option.
Re: Extracting the residual series from MGARCH-M model
Posted: Wed Jun 17, 2015 1:22 pm
by TomDoan
econo wrote:I used this code and just want to export residuals, then in R-program calculate standardized residuals!
Code: Select all
garch(p=1,q=1,model=var1,mv=CC,variance=varma,pmethod=simplex,piters=5,rvectors=rd,hmatrices=hh, MVHSERIES=VarmaHmatrix ) gstart gend O 22
EWISE X(t)=rd(t)
## SX11. Identifier X is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>EWISE X(<<<<
I assume this is what you're trying to do:
dec vect[series] x(%nvar)
do i=1,%nvar
set x(i) = rd(t)(i)
end do i
econo wrote:
Moreover, I used this code as you said
Code: Select all
garch(p=1,q=1,model=var1,mv=CC,variance=varma,pmethod=simplex,piters=5,rvectors=rd,hmatrices=hh, MVHSERIES=VarmaHmatrix )
dec vect[series] zu(%nvar)
do time=%regstart(),%regend()
compute %pt(zu,time,%solve(%decomp(hh(time)),rd(time)))
end do time
@mvqstat(lags=40)
# zu
the second code calculates standardized residuals(?!) but this results (with RATS 8.0) differ from the ones I calculated with RATS 9.0 option.
The STDRESIDS option on GARCH in version 9 will produce exactly the same standardized residuals as the code above computes. Maybe you're using a different number of lags in the @MVQSTAT.
Re: Extracting the residual series from MGARCH-M model
Posted: Wed Jun 17, 2015 4:02 pm
by econo
TomDoan wrote:
I assume this is what you're trying to do:
dec vect[series] x(%nvar)
do i=1,%nvar
set x(i) = rd(t)(i)
end do i
still gives this error:
## MAT15. Subscripts Too Large or Non-Positive
Error was evaluating entry 2355
The Error Occurred At Location 86, Line 2 of loop/block
Re: Extracting the residual series from MGARCH-M model
Posted: Wed Jun 17, 2015 4:11 pm
by TomDoan
As I said before, you'll need to attach the whole program, not just bits and pieces. You have an issue with the range of your calculations and I can't tell what that is. (There's an "Upload Attachment" tab at the bottom of the posting page).
Re: Extracting the residual series from MGARCH-M model
Posted: Wed Jun 17, 2015 4:34 pm
by econo
TomDoan wrote:
Maybe you're using a different number of lags in the @MVQSTAT.
yes, It was lags problem.
Now it works perfect and thanx alot