Date: Fri, 4 Jun 2010 09:01:55 +0200
Reply-To: Marta García-Granero <mgarciagranero@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Marta García-Granero <mgarciagranero@gmail.com>
Subject: Re: "Matrix-End Matrix" problem including subjects' id #s
In-Reply-To: <201006032010.o53AlTXs026410@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Harrisonlv@JUNO.COM wrote:
> MATRIX.
> GET A /FILE="c:\academy\zscores.sav" / VARLIST=ZPHQ2 TO ZPHQ240 / MISSING =
> OMIT .
> GET B /FILE="c:\academy\academy2.sav" / VARLIST=var001 to var014 /MISSING =
> OMIT .
> COMPUTE SCORES = A*B .
> SAVE SCORES /OUTFILE="c:\academy\scored.sav" .
> END MATRIX .
>
> I used this syntax to create factor scores for my subjects. The
> "zscores.sav" file contains my standardized variables (zphq2 to zphq240) and
> the subjects' id #s (id_numb). How can I include the variable "id_numb" in
> the "scored.sav" file along with the subject's factor scores?
>
>
>
Hi "Harrisonlv":
Untested, but this modified syntax should do what you want:
MATRIX.
GET ZScores /FILE="c:\academy\zscores.sav" / VARLIST=id_numb ZPHQ2 TO
ZPHQ240 /NAMES=VNames/ MISSING =
OMIT .
COMPUTE NVars=NCOL(ZScores).
COMPUTE Id=ZScores(:,1).
COMPUTE A=ZScores(:,2:NVars).
RELEASE ZScores, NVars.
GET B /FILE="c:\academy\academy2.sav" / VARLIST=var001 to var014 /MISSING =
OMIT .
COMPUTE SCORES = A*B .
SAVE {Id,SCORES} /NAMES=VNames /OUTFILE="c:\academy\scored.sav" .
END MATRIX .
Tell me if it doesn't.
Marta GG
--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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
|