Re: Simple Matrix Calculations
Posted by
David Marso on
Apr 17, 2012; 4:11pm
URL: http://spssx-discussion.165.s1.nabble.com/Simple-Matrix-Calculations-tp5646925p5646943.html
This is pretty well spelled out in the Syntax reference guide!!!
---
data list free / a b c.
begin data
1 2 3 2 3 4 6 5 7 6 5 4 4 3 4 4 3 3
end data.
MATRIX.
GET data / FILE * / VAR ALL.
COMPUTE XTXINV=GINV(T(data)*data).
SAVE XTXINV / OUTFILE 'temp.sav'.
END MATRIX.
GET FILE 'temp.sav'.
LIST.
Matt Freeman wrote
I'm new to SPSS and I have some "under the hood" work to do with principal
component analysis. Can anyone provide me with the SPSS syntax for reading
the active dataset to a matrix, and then writing the resulting matrix to the
another data set.
Read active data set.
(I'll do some matrix computations I know how to do)
Write resulting matrix to a new data set.
Thanks, Matt
=====================
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?"