[hidden email] 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
[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