orthogonalizing data
orthogonalizing data
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
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.
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
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.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.
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
dec vec[series] s(3)
set s(1) = mkt
set s(2) = opp
set s(3) = senti
set s(1) = mkt
set s(2) = opp
set s(3) = senti
Re: orthogonalizing data
Thank you so much, Tom. I am truly sorry for posting question without carefully examining my code first. Thank you againTomDoan wrote:dec vec[series] s(3)
set s(1) = mkt
set s(2) = opp
set s(3) = senti
Re: orthogonalizing data
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? RegardsTomDoan 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.
- Attachments
-
- equations.png (14.24 KiB) Viewed 10409 times
Re: orthogonalizing data
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.