LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2010)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 4 Jun 2010 09:01:55 +0200
Reply-To:     Marta García-Granero <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Marta García-Granero <>
Subject:      Re: "Matrix-End Matrix" problem including subjects' id #s
In-Reply-To:  <>
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:

===================== 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

Back to: Top of message | Previous page | Main SPSSX-L page