orthogonalizing data

For questions and discussion related to reading in and working with data.
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

orthogonalizing data

Unread post by fan »

Hi Tom, orthogonal. Is there any process I can use to orthogonalize data, such as Gram-Schmidt process, in Rats? Many Thanks
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: orthogonalizing data

Unread post 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.
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: orthogonalizing data

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: orthogonalizing data

Unread post by TomDoan »

dec vec[series] s(3)
set s(1) = mkt
set s(2) = opp
set s(3) = senti
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: orthogonalizing data

Unread post 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
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Re: orthogonalizing data

Unread post 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
Attachments
equations.png
equations.png (14.24 KiB) Viewed 10403 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: orthogonalizing data

Unread post 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.
Post Reply