Page 1 of 1

orthogonalizing data

Posted: Wed Mar 11, 2015 12:58 pm
by fan
Hi Tom, orthogonal. Is there any process I can use to orthogonalize data, such as Gram-Schmidt process, in Rats? Many Thanks

Re: orthogonalizing data

Posted: Wed Mar 11, 2015 1:50 pm
by TomDoan
You mean aside from %GSORTHO?

If you're talking about orthogonalizing two data series, that's basically what @STRUCTRESIDS is designed to do. Take the covariance matrix of the two series with VCV and feed the desired factor of that (%DECOMP will give you the same result as a G-S orthonormalization) into the procedure.

Re: orthogonalizing data

Posted: Wed Mar 11, 2015 6:10 pm
by fan
TomDoan wrote:You mean aside from %GSORTHO?

If you're talking about orthogonalizing two data series, that's basically what @STRUCTRESIDS is designed to do. Take the covariance matrix of the two series with VCV and feed the desired factor of that (%DECOMP will give you the same result as a G-S ) into the procedure.
Hi Tom. Thank you so much for the reply. I tried what you suggested and I think I made a mistake somewhere I could not ssee as after doing the orthonormalization the variances of the data series are equal to 0, instead of be close to 1. Could you please take a quick look and let me know the potential mistake I made? Thank you very much.

Code: Select all


dec vec[series] s(3)
set s1 = mkt
set s2 = opp
set s3 = senti
vcv(matrix=vcvmat)
# mkt opp senti
@structresids(factor=%decomp(vcvmat)) s / snew

Re: orthogonalizing data

Posted: Wed Mar 11, 2015 6:36 pm
by TomDoan
dec vec[series] s(3)
set s(1) = mkt
set s(2) = opp
set s(3) = senti

Re: orthogonalizing data

Posted: Wed Mar 11, 2015 9:20 pm
by fan
TomDoan wrote:dec vec[series] s(3)
set s(1) = mkt
set s(2) = opp
set s(3) = senti
Thank you so much, Tom. I am truly sorry for posting question without carefully examining my code first. Thank you again

Re: orthogonalizing data

Posted: Thu Apr 16, 2015 1:41 pm
by fan
TomDoan wrote:You mean aside from %GSORTHO?

If you're talking about orthogonalizing two data series, that's basically what @STRUCTRESIDS is designed to do. Take the covariance matrix of the two series with VCV and feed the desired factor of that (%DECOMP will give you the same result as a G-S orthonormalization) into the procedure.
Hi Tom, Sorry to post question again. Does it make sense to you if I am going to othogonalize dependent variable and independent variable in a regression model. In my project, I am trying to decompose the return variance into three independent factors(f1, f2, d3), they are identified from the kalman filter process . And then I am trying to see how to the return variance explained by factor f1 is coming from the dummy variable embedded in the transition equation for the factor. In project, I assume f1 follows a AR(1) process with dummy drift. My professor suggests me to orthogonalize f1 and the dummy variable. however, I do not think it makes any sense to orthogonalize the dependent variable and independent variable first, and then run the transition equation again to get the estimates needed. Could you please kindly share your thoughts with me? Regards

Re: orthogonalizing data

Posted: Thu Apr 16, 2015 5:55 pm
by TomDoan
How are you dealing with the fact that, with the dummy shift, your f1 isn't mean zero? I think that's what he's trying to get at.