SVD to non-symetric Matrix (@svd)
Moderators: EViews Gareth, EViews Moderator
SVD to non-symetric Matrix (@svd)
I just found that Eviews only allows it to symetric matrices, because of complex numbers. Anyone have a suggestion on how to do it in eviews. I don't really know if it's possible doing it manually. Need something like the "fullsvd" function of stata, though I don't use that software.
-
EViews Matt
- EViews Developer
- Posts: 583
- Joined: Thu Apr 25, 2013 7:48 pm
Re: SVD to non-symetric Matrix (@svd)
Hello,
EViews can perform the SVD of non-symmetric, non-square matrices. Do you have a matrix for which @svd fails?
EViews can perform the SVD of non-symmetric, non-square matrices. Do you have a matrix for which @svd fails?
Re: SVD to non-symetric Matrix (@svd)
yes I have a matrix "A" of 31 rows and 57 columns. i have the size mismatch message.
matrix V
vector sing_val
matrix U
matrix U=@svd(A,sing_val,V)
The type of descomposition I need is this one: A(mxn)= U(mxm)*S(mxn) *V(nxn), this is my main concern
and the SVD for non-symetric gives u this : A(mxn)= U(mxn)*S(nxn) *V(nxn)
matrix V
vector sing_val
matrix U
matrix U=@svd(A,sing_val,V)
The type of descomposition I need is this one: A(mxn)= U(mxm)*S(mxn) *V(nxn), this is my main concern
and the SVD for non-symetric gives u this : A(mxn)= U(mxn)*S(nxn) *V(nxn)
-
EViews Matt
- EViews Developer
- Posts: 583
- Joined: Thu Apr 25, 2013 7:48 pm
Re: SVD to non-symetric Matrix (@svd)
I'll look into the error. Know that EViews calculates the "economy" SVD which removes portions of the results that correspond to singular values of zero, where as what you want is the "full" SVD.
Re: SVD to non-symetric Matrix (@svd)
Thank you. Exactly, the full SVD like in the other software.
-
EViews Matt
- EViews Developer
- Posts: 583
- Joined: Thu Apr 25, 2013 7:48 pm
Re: SVD to non-symetric Matrix (@svd)
I'm afraid the full SVD isn't available in EViews 9 (EViews 10 includes it). However, you can do something close to the full SVD by extending your matrix to be square and filling in the extra rows with zeros. The resulting U matrix will have extra rows and columns, but the true U can easily be extracted. I think the only numeric difference would be in the rightmost columns of V, corresponding to the null-space basis of your original matrix. Depending on what you're using the SVD for, that difference may be acceptable.
Re: SVD to non-symetric Matrix (@svd)
The SVD comand gives me more the "S" matrix(31x31) , which contains the eigenvalues. Then I add colums of ceros, so i have a new S (31x57). Then I also have the A matrix by default.
A(31x57)-U(31x31)*S(31x57)*V(57x57)= zero (31x57), I only have reliable data for A and S. And I will use one of the outputs of the @sdv as "U(31x31)".
I only need to calculate "V(57x57)", how can I solve the equation ? which code should I used. Noting that "U*S" can't be inverse because it's not square. I guess anytype of goalseek command or something.
Thank u a lot for your help.
PD: Eviews 10 is not available yet, but in 9.5 , u think I'll have more lucky? I use eviews 8.
A(31x57)-U(31x31)*S(31x57)*V(57x57)= zero (31x57), I only have reliable data for A and S. And I will use one of the outputs of the @sdv as "U(31x31)".
I only need to calculate "V(57x57)", how can I solve the equation ? which code should I used. Noting that "U*S" can't be inverse because it's not square. I guess anytype of goalseek command or something.
Thank u a lot for your help.
PD: Eviews 10 is not available yet, but in 9.5 , u think I'll have more lucky? I use eviews 8.
-
EViews Matt
- EViews Developer
- Posts: 583
- Joined: Thu Apr 25, 2013 7:48 pm
Re: SVD to non-symetric Matrix (@svd)
You're trying to take the SVD of matrix A(31x57), correct? My suggestion is to add rows of zeros to A until it is square (57x57).
-
EViews Matt
- EViews Developer
- Posts: 583
- Joined: Thu Apr 25, 2013 7:48 pm
Re: SVD to non-symetric Matrix (@svd)
In the next patch, @svd will be able to decompose matrices with fewer rows than columns, which was (to my knowledge) an undocumented limitation. The decomposition is still the "economic" or "compact" form, not the full SVD.
Who is online
Users browsing this forum: No registered users and 2 guests
