YTSMPIRD ;SLC/KCM - Data for Scoring MMPI-2-RF ; 10/24/2015
;;5.01;MENTAL HEALTH;**123,142**;Dec 30, 1994;Build 14
;
BLDRAW ; Build tables for raw scores
; T("raw",scale,qId)=#^key {^#^key^+-^CBS^Qa^Qb^Kb^Qc^Kc}
; where qId is question number or #key#key for pair
; +- indicates add or subtract (for TRIN-r)
; CBS indicates common, both, or skip (for VRIN-r)
; Qa is common question (for VRIN-r)
; Qb,Kb,Qc,Kc are other items in pair (for VRIN-r)
;
; build tables for raw scores
N I,J,X,SCALE,ROW,QID,RAW,DFLT,SCORE
K T ; start fresh
F I=1:1 S X=$P($T(TBLRAW+I^YTSMPI2T),";;",2,99) Q:X="zzzzz" D
.S SCALE=$P(X,";"),X=$P(X,";",2)
.F J=1:1 S ROW=$P(X,"~",J) Q:'$L(ROW) D
..S QID=$S(+$P(ROW,U,3):$TR($P(ROW,U,1,4),U,""),1:+ROW)
..S T("raw",SCALE,QID)=ROW
; build tables for scale information
F I=1:1 S X=$P($T(TBLINFO+I^YTSMPI2T),";;",2,99) Q:X="zzzzz" D
.S SCALE=$P(X,U)
.S T("info",SCALE,"count")=$P(X,U,2)
.S T("info",SCALE,"adjust")=+$P(X,U,3)
; build tables for T-Scores
F I=1:1 S X=$P($T(TBLTSCOR+I),";;",2,99) Q:X="zzzzz" D
.S SCALE=$P(X,";"),DFLT=$P(X,";",2),X=$P(X,";",3,999)
.S T("tscore",SCALE,"default")=DFLT
.F J=1:1 S ROW=$P(X,"~",J) Q:'$L(ROW) D
..S RAW=$P(ROW,U),SCORE=$P(ROW,U,2)
..S T("tscore",SCALE,RAW)=SCORE
Q
TBLTSCOR ;; T-Score tables
;;VRIN-r;120;0^34~1^39~2^43~3^48~4^53~5^58~6^63~7^68~8^73~9^77~10^82~11^87~12^92~13^97~14^102~15^106~16^111~17^116~
;;TRIN-r;120;2^118~3^110~4^103~5^95~6^88~7^80~8^73~9^65~10^57~11^50~12^57~13^65~14^73~15^80~16^88~17^95~18^103~19^110~20^118~
;;F-r;120;0^42~1^47~2^51~3^56~4^61~5^65~6^70~7^74~8^79~9^83~10^88~11^92~12^97~13^101~14^106~15^111~16^115~
;;Fp-r;120;0^42~1^51~2^59~3^68~4^77~5^85~6^94~7^102~8^111~9^119~
;;Fs;120;0^42~1^50~2^58~3^66~4^74~5^83~6^91~7^99~8^107~9^115~
;;FBS-r;120;0^26~1^29~2^32~3^35~4^39~5^42~6^45~7^48~8^51~9^54~10^58~11^61~12^64~13^67~14^70~15^73~16^77~17^80~18^83~19^86~20^89~21^92~22^96~23^99~24^102~25^105~26^108~27^111~28^115~29^118~30^120~
;;RBS;120;0^29~1^33~2^38~3^42~4^46~5^50~6^54~7^59~8^63~9^67~10^71~11^76~12^80~13^84~14^88~15^92~16^97~17^101~18^105~19^109~20^114~21^118~22^120~23^120~24^120~25^120~26^120~27^120~28^120~
;;L-r;120;0^37~1^42~2^47~3^52~4^57~5^62~6^66~7^71~8^76~9^81~10^86~11^91~12^95~13^100~14^105~
;;K-r;120;0^24~1^28~2^31~3^35~4^38~5^42~6^45~7^48~8^52~9^55~10^59~11^62~12^66~13^69~14^72~
;;EID;120;0^30~1^33~2^36~3^38~4^41~5^43~6^45~7^46~8^48~9^49~10^51~11^52~12^53~13^54~14^56~15^57~16^58~17^59~18^61~19^62~20^64~21^65~22^66~23^68~24^69~25^71~26^72~27^73~
;;EID;120;28^75~29^76~30^78~31^79~32^80~33^82~34^83~35^85~36^86~37^87~38^89~39^90~40^92~41^93~
;;THD;100;0^39~1^48~2^53~3^57~4^60~5^63~6^67~7^70~8^74~9^77~10^81~11^84~12^88~13^91~14^94~15^98~
;;BXD;0;0^32~1^36~2^40~3^43~4^46~5^48~6^50~7^53~8^55~9^57~10^60~11^63~12^65~13^68~14^70~15^73~16^76~17^78~18^81~19^84~20^86~21^89~22^92~23^94~
;;RCd;0;0^37~1^42~2^46~3^49~4^51~5^53~6^54~7^55~8^57~9^58~10^60~11^62~12^64~13^66~14^67~15^69~16^71~17^73~18^75~19^77~20^79~21^81~22^83~23^85~24^86~
;;RC1;100;0^36~1^42~2^47~3^51~4^54~5^56~6^59~7^61~8^63~9^65~10^68~11^70~12^72~13^74~14^77~15^79~16^81~17^84~18^86~19^88~20^90~21^93~22^95~23^97~24^99~
;;RC2;0;0^34~1^38~2^42~3^46~4^50~5^54~6^58~7^61~8^65~9^69~10^73~11^76~12^80~13^84~14^88~15^92~16^95~17^99~
;;RC3;0;0^34~1^38~2^41~3^43~4^46~5^47~6^49~7^51~8^54~9^57~10^61~11^65~12^70~13^74~14^79~15^83~
;;RC4;0;0^34~1^39~2^43~3^46~4^49~5^52~6^54~7^57~8^59~9^62~10^65~11^68~12^71~13^73~14^76~15^79~16^82~17^85~18^87~19^90~20^93~21^96~22^99~
;;RC6;100;0^43~1^56~2^61~3^66~4^70~5^75~6^80~7^84~8^89~9^94~10^98~
;;RC7;0;0^34~1^38~2^41~3^44~4^46~5^48~6^50~7^52~8^53~9^55~10^57~11^60~12^62~13^65~14^68~15^70~16^73~17^75~18^78~19^81~20^83~21^86~22^88~23^91~24^94~
;;RC8;100;0^39~1^47~2^52~3^56~4^59~5^63~6^66~7^70~8^73~9^76~10^80~11^83~12^86~13^90~14^93~15^96~
;;RC9;0;0^25~1^28~2^31~3^33~4^36~5^38~6^40~7^42~8^43~9^45~10^46~11^48~12^50~13^51~14^53~15^56~16^58~17^61~18^63~19^66~20^69~21^72~22^74~23^77~24^80~25^83~26^85~27^88~28^91~
;;MLS;0;0^38~1^46~2^52~3^57~4^63~5^69~6^75~7^81~8^87~
;;HPC;0;0^42~1^53~2^59~3^65~4^72~5^78~6^85~
;;NUC;0;0^41~1^53~2^59~3^65~4^70~5^75~6^80~7^86~8^91~9^96~10^100~
;;GIC;0;0^46~1^64~2^72~3^80~4^88~5^96~
;;SUI;100;0^45~1^66~2^79~3^91~
;;HLP;0;0^40~1^52~2^60~3^69~4^79~5^88~
;;SFD;0;0^42~1^52~2^56~3^65~4^76~
;;NFC;0;0^36~1^43~2^48~3^51~4^54~5^58~6^64~7^69~8^75~9^80~
;;COG;0;0^40~1^50~2^54~3^58~4^64~5^69~6^75~7^80~8^86~9^91~10^96~
;;STW;0;0^36~1^43~2^47~3^52~4^57~5^65~6^73~7^81~
;;AXY;0;0^44~1^59~2^70~3^80~4^91~5^100~
;;ANP;0;0^39~1^47~2^51~3^54~4^59~5^66~6^73~7^80~
;;BRF;100;0^43~1^56~2^63~3^71~4^79~5^86~6^94~
;;MSF;0;0^36~1^42~2^46~3^48~4^51~5^54~6^59~7^65~8^71~9^78~
;;JCP;0;0^40~1^50~2^57~3^63~4^70~5^77~6^84~
;;SUB;0;0^41~1^50~2^55~3^61~4^69~5^77~6^85~7^93~
;;AGG;0;0^37~1^45~2^51~3^56~4^61~5^67~6^73~7^79~8^86~9^92~
;;ACT;0;0^33~1^39~2^44~3^48~4^53~5^59~6^67~7^75~8^83~
;;FML;0;0^37~1^44~2^49~3^53~4^58~5^63~6^68~7^74~8^79~9^84~10^90~
;;IPP;0;0^34~1^39~2^43~3^46~4^49~5^52~6^56~7^62~8^68~9^74~10^81~
;;SAV;0;0^36~1^43~2^47~3^50~4^52~5^55~6^59~7^65~8^70~9^75~10^80~
;;SHY;0;0^37~1^44~2^47~3^50~4^52~5^57~6^66~7^75~
;;DSF;0;0^44~1^58~2^68~3^78~4^88~5^98~6^100~
;;AES;0;0^33~1^39~2^45~3^50~4^56~5^62~6^68~7^73~
;;MEC;0;0^38~1^43~2^47~3^52~4^56~5^61~6^65~7^69~8^74~9^78~
;;AGGR;0;0^28~1^32~2^35~3^37~4^39~5^41~6^43~7^45~8^47~9^50~10^53~11^56~12^60~13^65~14^69~15^74~16^78~17^83~18^88~
;;PSYC;100;0^38~1^47~2^52~3^56~4^59~5^63~6^66~7^69~8^73~9^76~10^79~11^83~12^86~13^89~14^93~15^96~
;;DISC;0;0^31~1^35~2^38~3^41~4^44~5^47~6^49~7^51~8^54~9^56~10^59~11^63~12^66~13^69~14^72~15^75~16^79~17^82~18^85~19^88~20^92~
;;NEGE;0;0^32~1^36~2^40~3^42~4^45~5^47~6^49~7^51~8^53~9^56~10^59~11^62~12^66~13^69~14^73~15^77~16^80~17^84~18^88~19^91~20^95~
;;INTR;0;0^32~1^36~2^39~3^42~4^45~5^47~6^49~7^52~8^54~9^57~10^60~11^64~12^67~13^70~14^74~15^77~16^80~17^83~18^87~19^90~20^93~
;;zzzzz
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYTSMPIRD 6041 printed Dec 13, 2024@02:20:23 Page 2
YTSMPIRD ;SLC/KCM - Data for Scoring MMPI-2-RF ; 10/24/2015
+1 ;;5.01;MENTAL HEALTH;**123,142**;Dec 30, 1994;Build 14
+2 ;
BLDRAW ; Build tables for raw scores
+1 ; T("raw",scale,qId)=#^key {^#^key^+-^CBS^Qa^Qb^Kb^Qc^Kc}
+2 ; where qId is question number or #key#key for pair
+3 ; +- indicates add or subtract (for TRIN-r)
+4 ; CBS indicates common, both, or skip (for VRIN-r)
+5 ; Qa is common question (for VRIN-r)
+6 ; Qb,Kb,Qc,Kc are other items in pair (for VRIN-r)
+7 ;
+8 ; build tables for raw scores
+9 NEW I,J,X,SCALE,ROW,QID,RAW,DFLT,SCORE
+10 ; start fresh
KILL T
+11 FOR I=1:1
SET X=$PIECE($TEXT(TBLRAW+I^YTSMPI2T),";;",2,99)
if X="zzzzz"
QUIT
Begin DoDot:1
+12 SET SCALE=$PIECE(X,";")
SET X=$PIECE(X,";",2)
+13 FOR J=1:1
SET ROW=$PIECE(X,"~",J)
if '$LENGTH(ROW)
QUIT
Begin DoDot:2
+14 SET QID=$SELECT(+$PIECE(ROW,U,3):$TRANSLATE($PIECE(ROW,U,1,4),U,""),1:+ROW)
+15 SET T("raw",SCALE,QID)=ROW
End DoDot:2
End DoDot:1
+16 ; build tables for scale information
+17 FOR I=1:1
SET X=$PIECE($TEXT(TBLINFO+I^YTSMPI2T),";;",2,99)
if X="zzzzz"
QUIT
Begin DoDot:1
+18 SET SCALE=$PIECE(X,U)
+19 SET T("info",SCALE,"count")=$PIECE(X,U,2)
+20 SET T("info",SCALE,"adjust")=+$PIECE(X,U,3)
End DoDot:1
+21 ; build tables for T-Scores
+22 FOR I=1:1
SET X=$PIECE($TEXT(TBLTSCOR+I),";;",2,99)
if X="zzzzz"
QUIT
Begin DoDot:1
+23 SET SCALE=$PIECE(X,";")
SET DFLT=$PIECE(X,";",2)
SET X=$PIECE(X,";",3,999)
+24 SET T("tscore",SCALE,"default")=DFLT
+25 FOR J=1:1
SET ROW=$PIECE(X,"~",J)
if '$LENGTH(ROW)
QUIT
Begin DoDot:2
+26 SET RAW=$PIECE(ROW,U)
SET SCORE=$PIECE(ROW,U,2)
+27 SET T("tscore",SCALE,RAW)=SCORE
End DoDot:2
End DoDot:1
+28 QUIT
TBLTSCOR ;; T-Score tables
+1 ;;VRIN-r;120;0^34~1^39~2^43~3^48~4^53~5^58~6^63~7^68~8^73~9^77~10^82~11^87~12^92~13^97~14^102~15^106~16^111~17^116~
+2 ;;TRIN-r;120;2^118~3^110~4^103~5^95~6^88~7^80~8^73~9^65~10^57~11^50~12^57~13^65~14^73~15^80~16^88~17^95~18^103~19^110~20^118~
+3 ;;F-r;120;0^42~1^47~2^51~3^56~4^61~5^65~6^70~7^74~8^79~9^83~10^88~11^92~12^97~13^101~14^106~15^111~16^115~
+4 ;;Fp-r;120;0^42~1^51~2^59~3^68~4^77~5^85~6^94~7^102~8^111~9^119~
+5 ;;Fs;120;0^42~1^50~2^58~3^66~4^74~5^83~6^91~7^99~8^107~9^115~
+6 ;;FBS-r;120;0^26~1^29~2^32~3^35~4^39~5^42~6^45~7^48~8^51~9^54~10^58~11^61~12^64~13^67~14^70~15^73~16^77~17^80~18^83~19^86~20^89~21^92~22^96~23^99~24^102~25^105~26^108~27^111~28^115~29^118~30^120~
+7 ;;RBS;120;0^29~1^33~2^38~3^42~4^46~5^50~6^54~7^59~8^63~9^67~10^71~11^76~12^80~13^84~14^88~15^92~16^97~17^101~18^105~19^109~20^114~21^118~22^120~23^120~24^120~25^120~26^120~27^120~28^120~
+8 ;;L-r;120;0^37~1^42~2^47~3^52~4^57~5^62~6^66~7^71~8^76~9^81~10^86~11^91~12^95~13^100~14^105~
+9 ;;K-r;120;0^24~1^28~2^31~3^35~4^38~5^42~6^45~7^48~8^52~9^55~10^59~11^62~12^66~13^69~14^72~
+10 ;;EID;120;0^30~1^33~2^36~3^38~4^41~5^43~6^45~7^46~8^48~9^49~10^51~11^52~12^53~13^54~14^56~15^57~16^58~17^59~18^61~19^62~20^64~21^65~22^66~23^68~24^69~25^71~26^72~27^73~
+11 ;;EID;120;28^75~29^76~30^78~31^79~32^80~33^82~34^83~35^85~36^86~37^87~38^89~39^90~40^92~41^93~
+12 ;;THD;100;0^39~1^48~2^53~3^57~4^60~5^63~6^67~7^70~8^74~9^77~10^81~11^84~12^88~13^91~14^94~15^98~
+13 ;;BXD;0;0^32~1^36~2^40~3^43~4^46~5^48~6^50~7^53~8^55~9^57~10^60~11^63~12^65~13^68~14^70~15^73~16^76~17^78~18^81~19^84~20^86~21^89~22^92~23^94~
+14 ;;RCd;0;0^37~1^42~2^46~3^49~4^51~5^53~6^54~7^55~8^57~9^58~10^60~11^62~12^64~13^66~14^67~15^69~16^71~17^73~18^75~19^77~20^79~21^81~22^83~23^85~24^86~
+15 ;;RC1;100;0^36~1^42~2^47~3^51~4^54~5^56~6^59~7^61~8^63~9^65~10^68~11^70~12^72~13^74~14^77~15^79~16^81~17^84~18^86~19^88~20^90~21^93~22^95~23^97~24^99~
+16 ;;RC2;0;0^34~1^38~2^42~3^46~4^50~5^54~6^58~7^61~8^65~9^69~10^73~11^76~12^80~13^84~14^88~15^92~16^95~17^99~
+17 ;;RC3;0;0^34~1^38~2^41~3^43~4^46~5^47~6^49~7^51~8^54~9^57~10^61~11^65~12^70~13^74~14^79~15^83~
+18 ;;RC4;0;0^34~1^39~2^43~3^46~4^49~5^52~6^54~7^57~8^59~9^62~10^65~11^68~12^71~13^73~14^76~15^79~16^82~17^85~18^87~19^90~20^93~21^96~22^99~
+19 ;;RC6;100;0^43~1^56~2^61~3^66~4^70~5^75~6^80~7^84~8^89~9^94~10^98~
+20 ;;RC7;0;0^34~1^38~2^41~3^44~4^46~5^48~6^50~7^52~8^53~9^55~10^57~11^60~12^62~13^65~14^68~15^70~16^73~17^75~18^78~19^81~20^83~21^86~22^88~23^91~24^94~
+21 ;;RC8;100;0^39~1^47~2^52~3^56~4^59~5^63~6^66~7^70~8^73~9^76~10^80~11^83~12^86~13^90~14^93~15^96~
+22 ;;RC9;0;0^25~1^28~2^31~3^33~4^36~5^38~6^40~7^42~8^43~9^45~10^46~11^48~12^50~13^51~14^53~15^56~16^58~17^61~18^63~19^66~20^69~21^72~22^74~23^77~24^80~25^83~26^85~27^88~28^91~
+23 ;;MLS;0;0^38~1^46~2^52~3^57~4^63~5^69~6^75~7^81~8^87~
+24 ;;HPC;0;0^42~1^53~2^59~3^65~4^72~5^78~6^85~
+25 ;;NUC;0;0^41~1^53~2^59~3^65~4^70~5^75~6^80~7^86~8^91~9^96~10^100~
+26 ;;GIC;0;0^46~1^64~2^72~3^80~4^88~5^96~
+27 ;;SUI;100;0^45~1^66~2^79~3^91~
+28 ;;HLP;0;0^40~1^52~2^60~3^69~4^79~5^88~
+29 ;;SFD;0;0^42~1^52~2^56~3^65~4^76~
+30 ;;NFC;0;0^36~1^43~2^48~3^51~4^54~5^58~6^64~7^69~8^75~9^80~
+31 ;;COG;0;0^40~1^50~2^54~3^58~4^64~5^69~6^75~7^80~8^86~9^91~10^96~
+32 ;;STW;0;0^36~1^43~2^47~3^52~4^57~5^65~6^73~7^81~
+33 ;;AXY;0;0^44~1^59~2^70~3^80~4^91~5^100~
+34 ;;ANP;0;0^39~1^47~2^51~3^54~4^59~5^66~6^73~7^80~
+35 ;;BRF;100;0^43~1^56~2^63~3^71~4^79~5^86~6^94~
+36 ;;MSF;0;0^36~1^42~2^46~3^48~4^51~5^54~6^59~7^65~8^71~9^78~
+37 ;;JCP;0;0^40~1^50~2^57~3^63~4^70~5^77~6^84~
+38 ;;SUB;0;0^41~1^50~2^55~3^61~4^69~5^77~6^85~7^93~
+39 ;;AGG;0;0^37~1^45~2^51~3^56~4^61~5^67~6^73~7^79~8^86~9^92~
+40 ;;ACT;0;0^33~1^39~2^44~3^48~4^53~5^59~6^67~7^75~8^83~
+41 ;;FML;0;0^37~1^44~2^49~3^53~4^58~5^63~6^68~7^74~8^79~9^84~10^90~
+42 ;;IPP;0;0^34~1^39~2^43~3^46~4^49~5^52~6^56~7^62~8^68~9^74~10^81~
+43 ;;SAV;0;0^36~1^43~2^47~3^50~4^52~5^55~6^59~7^65~8^70~9^75~10^80~
+44 ;;SHY;0;0^37~1^44~2^47~3^50~4^52~5^57~6^66~7^75~
+45 ;;DSF;0;0^44~1^58~2^68~3^78~4^88~5^98~6^100~
+46 ;;AES;0;0^33~1^39~2^45~3^50~4^56~5^62~6^68~7^73~
+47 ;;MEC;0;0^38~1^43~2^47~3^52~4^56~5^61~6^65~7^69~8^74~9^78~
+48 ;;AGGR;0;0^28~1^32~2^35~3^37~4^39~5^41~6^43~7^45~8^47~9^50~10^53~11^56~12^60~13^65~14^69~15^74~16^78~17^83~18^88~
+49 ;;PSYC;100;0^38~1^47~2^52~3^56~4^59~5^63~6^66~7^69~8^73~9^76~10^79~11^83~12^86~13^89~14^93~15^96~
+50 ;;DISC;0;0^31~1^35~2^38~3^41~4^44~5^47~6^49~7^51~8^54~9^56~10^59~11^63~12^66~13^69~14^72~15^75~16^79~17^82~18^85~19^88~20^92~
+51 ;;NEGE;0;0^32~1^36~2^40~3^42~4^45~5^47~6^49~7^51~8^53~9^56~10^59~11^62~12^66~13^69~14^73~15^77~16^80~17^84~18^88~19^91~20^95~
+52 ;;INTR;0;0^32~1^36~2^39~3^42~4^45~5^47~6^49~7^52~8^54~9^57~10^60~11^64~12^67~13^70~14^74~15^77~16^80~17^83~18^87~19^90~20^93~
+53 ;;zzzzz
+54 QUIT