options ls=132 ps=53 nocenter;

** identify location of new multi100 macro code;
%include 'multi100.mac.sas';

libname t "..";
%let ds=051512;

TITLE1 "PROMIS GI data -gi_080312"; run;

/** set up factors and items needed for macro **/

data temp; set t.fix6&ds(
     rename=(gisx8189_ct = gi8189ct 
             gisx22rec   =gi22rec 
             gisx105rec  =gi105rec
             gisx62tri   =gi62tri));

if chk110=110 then delete;

f1=mean(of gisx2-gisx21 gi22rec gisx23-gisx30)*29;
f2=mean(of gisx31-gisx37)*7;
f3=mean(of gisx38-gisx44)*7;
f4=mean(of gisx45-gisx48)*4;
f5=mean(of gisx49-gisx61)*13;
f6=mean(of gisx63-gisx76)*14;
f7=mean(of gisx77-gisx80 gi8189ct gisx90-gisx92)*8;

f8=mean(of gisx93-gisx104 gi105rec gisx106-gisx110)*18;

misc=mean(of gisx1 gi62tri)*2;

label
f1   = "factor1 (29)"
f2   = "factor2 (7)"
f3   = "factor3 (7)"
f4   = "factor4 (4)"
f5   = "factor5 (13)"
f6   = "factor6 (14)"
f7   = "factor7 (8)"
f8   = "factor8 (18)"
misc = "Miscellaneous (2)";

run;

*options macrogen symbolgen;
*******************************************;
%MULTI (DATA=temp,
items1=gisx2-gisx21 gi22rec gisx23-gisx30,
items2=gisx31-gisx37,
items3=gisx38-gisx44,
items4=gisx45-gisx48,
items5=gisx49-gisx61,
items6=gisx63-gisx76,
items7=gisx77-gisx80 gi8189ct gisx90-gisx92,
items8=gisx93-gisx104 gi105rec gisx106-gisx110,
items9=,
items10=,items11=,items12=,items13=,items14=,items15=,
items16=,items17=,items18=,items19=,
NIT1=29,
NIT2=7,
NIT3=7,
NIT4=4,
NIT5=13,
NIT6=14,
NIT7=8,
NIT8=18,
NIT9=0,
NIT10=0,NIT11=0,NIT12=0,NIT13=0,NIT14=0,NIT15=0,NIT16=0,NIT17=0,
NIT18=0,NIT19=0,
nscal1=f1,
nscal2=f2,
nscal3=f3,
nscal4=f4,
nscal5=f5,
nscal6=f6,
nscal7=f7,
nscal8=f8,
nscal9=9,
nscal10=10,nscal11=11,nscal12=12,
nscal13=13,nscal14=14,nscal15=15,nscal16=16,nscal17=17,
nscal18=18,nscal19=19,
nscales=8);