Saving Q Matrix in Singular Value Decomposition

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Saving Q Matrix in Singular Value Decomposition

Atai Winkler-2
Hi all
 
 
I wonder if somebody can help me with a matrix problem.
 
I am doing a Singular Value Decomposition (SVD) and I then want to recover the Q matrix. My syntax is:
 
*******************************************************
 
MATRIX.
 
GET lin_depd
  /VARIABLES int_MPAA_ABS TO int_manu_grp_Other_WS.
CALL SVD(lin_depd, U, Q, V).
 
SAVE {Q}
  /OUTFILE=*.
 
EXECUTE.
 
END MATRIX.
 
*******************************************************
 
The code works correctly, and the matrix Q is generated as an unnamed dataset. Now, from page 1077 (bottom right, not on PDF toolbar) of the Command Syntax Reference manual:
 
‘To save a matrix expression as the active dataset, specify an asterisk (*). If there is no active dataset, one will be created; if there is one, it is replaced by the saved matrices’.
 
So, I have put an * in the OUTFILE command in the syntax above. Unfortunately, the file with the Q matrix does not have a dataset name or a file name. So, my question is: how I can recover the dataset with the
matrix Q so that I can use it later?
 
Thank you.
 
 
Atai
 
 
Dr Atai Winkler
[hidden email]
 
 
 
 
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Saving Q Matrix in Singular Value Decomposition

David Marso
Administrator
BEGIN DATA.
1 2 3 4 5 6 7 8 9
END DATA.
DATASET NAME raw.
MATRIX.
GET data /file * / variables a b c.
CALL SVD(data, U, Q, V).
SAVE Q / OUTFILE *.
END MATRIX.
LIST.

1. Give the initially active dataset a NAME.
2. FWIW: Get rid of the EXECUTE statement in the MATRIX block. It does NOT belong there!
HTH, Happy Friday!
---
Atai Winkler wrote
Hi all


I wonder if somebody can help me with a matrix problem.

I am doing a Singular Value Decomposition (SVD) and I then want to recover the Q matrix. My syntax is:

*******************************************************

MATRIX.

GET lin_depd
  /VARIABLES int_MPAA_ABS TO int_manu_grp_Other_WS.
CALL SVD(lin_depd, U, Q, V).

SAVE {Q}
  /OUTFILE=*.

EXECUTE.

END MATRIX.

*******************************************************

The code works correctly, and the matrix Q is generated as an unnamed dataset. Now, from page 1077 (bottom right, not on PDF toolbar) of the Command Syntax Reference manual:

‘To save a matrix expression as the active dataset, specify an asterisk (*). If there is no active dataset, one will be created; if there is one, it is replaced by the saved matrices’.

So, I have put an * in the OUTFILE command in the syntax above. Unfortunately, the file with the Q matrix does not have a dataset name or a file name. So, my question is: how I can recover the dataset with the
matrix Q so that I can use it later?

Thank you.


Atai


Dr Atai Winkler
[hidden email]





=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"