1                                                        The SAS System                          14:51 Sunday, February 14, 2021

NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3) 
      Licensed to UNIVERSITY OF CALIFORNIA SYSTEM-SFA-T&R, Site 70081229.
NOTE: This session is executing on the X64_7PRO  platform.

NOTE: Updated analytical products:
      
      SAS/STAT 14.1
      SAS/ETS 14.1
      SAS/IML 14.1
      SAS/QC 14.1

NOTE: Additional host information:

 X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

NOTE: SAS initialization used:
      real time           0.26 seconds
      cpu time            0.24 seconds
      
1          options orientation=portrait nocenter;
2          ods pdf file="C:\Projects\PROMIS-29\example\score29+2.pdf";
NOTE: Writing ODS PDF output to DISK destination "C:\Projects\PROMIS-29\example\score29+2.pdf", 
      printer "PDF".
3          
4          libname library "C:\Projects\PROMIS-29\example";
NOTE: Libref LIBRARY was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Projects\PROMIS-29\example
5          **************************************************************;
6          ** read in data output from AC and restructure to 1 record per PIN/Assessment,
7          ** incorporate Janel Hanmer Generic MAUT code 2017_09_01.sas code for PROPr,
8          ** merge in GLOBAL07 from raw data and create t- and z-scores for construction of
9          ** PROMIS-29 v2.0 Physical and Mental Health summary scores (PH29 and MH29);
10         **************************************************************;
11         
12         
13         /**************************************************/
14         * read in data from Assessment Center;
15         PROC IMPORT OUT= WORK.AC
16         DATAFILE= "C:\Projects\PROMIS-29\example\prom29plus2ex.csv" DBMS=CSV REPLACE;
17              GETNAMES=NO;
18              DATAROW=6;
19         RUN;

20          /**********************************************************************
21          *   PRODUCT:   SAS
22          *   VERSION:   9.4
23          *   CREATOR:   External File Interface
24          *   DATE:      14FEB21
25          *   DESC:      Generated SAS Datastep Code

2 The SAS System                                                   14:51 Sunday, February 14, 2021

26          *   TEMPLATE SOURCE:  (None Specified.)
27          ***********************************************************************/
28             data WORK.AC    ;
29             %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
30             infile 'C:\Projects\PROMIS-29\example\prom29plus2ex.csv' delimiter = ',' MISSOVER
30       ! DSD lrecl=32767 firstobs=6 ;
31                informat VAR1 best32. ;
32                informat VAR2 best32. ;
33                informat VAR3 $65. ;
34                informat VAR4 best32. ;
35                informat VAR5 best32. ;
36                informat VAR6 best32. ;
37                informat VAR7 best32. ;
38                informat VAR8 best32. ;
39                informat VAR9 best32. ;
40                format VAR1 best12. ;
41                format VAR2 best12. ;
42                format VAR3 $65. ;
43                format VAR4 best12. ;
44                format VAR5 best12. ;
45                format VAR6 best12. ;
46                format VAR7 best12. ;
47                format VAR8 best12. ;
48                format VAR9 best12. ;
49             input
50                         VAR1
51                         VAR2
52                         VAR3 $
53                         VAR4
54                         VAR5
55                         VAR6
56                         VAR7
57                         VAR8
58                         VAR9
59             ;
60             if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable
60       ! */
61             run;

NOTE: The infile 'C:\Projects\PROMIS-29\example\prom29plus2ex.csv' is:
      Filename=C:\Projects\PROMIS-29\example\prom29plus2ex.csv,
      RECFM=V,LRECL=32767,File Size (bytes)=6052,
      Last Modified=14Feb2021:13:45:49,
      Create Time=14Feb2021:13:45:49

NOTE: 93 records were read from the infile 'C:\Projects\PROMIS-29\example\prom29plus2ex.csv'.
      The minimum record length was 45.
      The maximum record length was 92.
NOTE: The data set WORK.AC has 93 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds

3 The SAS System                                                   14:51 Sunday, February 14, 2021

93 rows created in WORK.AC from C:\Projects\PROMIS-29\example\prom29plus2ex.csv.

  
NOTE: WORK.AC data set was successfully created.
NOTE: The data set WORK.AC has 93 observations and 9 variables.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.09 seconds
      cpu time            0.06 seconds

62         /**************************************************/
63         data ac; set ac;
64         rename
65         var1=pin
66         var2=assmnt
67         var3=inst
68         var5=Theta
69         var6=Tscore;
70         
71         *rename
72         var1=pin
73         var2=assmnt
74         var3=inst
75         var4=RawScore
76         var5=Theta
77         var6=Tscore
78         var7=SE
79         var8=ScrdCnt
80         var9=ItmCnt;
81         keep var1 var2 var3 var5 var6;
82         run;

NOTE: There were 93 observations read from the data set WORK.AC.
NOTE: The data set WORK.AC has 93 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

83         /*
84         TITLE "Initial read from AC CSV file"; run;
85         proc freq; tables inst; run;
86         */
87         /**************************************************/
88         
89         
90         
91         /****************************************************/
92         /* restructure data so one record per PIN/assessment -
93            output Tscores and save thetas.
94         */

4 The SAS System                                                   14:51 Sunday, February 14, 2021

95         /****************************************************/
96         
97         data PROPrData(keep=pin assmnt pain4a_t dep4a_t phy4a_t social4a_t fatig4a_t anx4a_t
97       ! slpd4a_t cog2_t
98          theta_pain theta_dep theta_phys theta_sr theta_fat theta_slp theta_cog);
99          set ac; by pin assmnt;
100        
101        if first.assmnt then do;
102        pain4a_t  =.;    theta_pain  =.;
103        dep4a_t   =.;    theta_dep   =.;
104        phy4a_t   =.;    theta_phys  =.;
105        social4a_t=.;    theta_sr    =.;
106        fatig4a_t =.;    theta_fat   =.;
107        anx4a_t   =.;
108        slpd4a_t  =.;    theta_slp   =.;
109        cog2_t    =.;    theta_cog   =.;
110        end;
111        
112        
113        retain pin assmnt pain4a_t dep4a_t phy4a_t social4a_t fatig4a_t anx4a_t slpd4a_t cog2_t
114          theta_pain theta_dep theta_phys theta_sr theta_fat theta_slp theta_cog;
115        
116        if index(inst,"Pain Interference")  > 0 then do; theta_pain   =Theta; pain4a_t  =Tscore
116      ! ; end;
117        if index(inst,"Depression/Sadness") > 0 then do; theta_dep    =Theta; dep4a_t   =Tscore
117      ! ; end;
118        if index(inst,"Physical Function")  > 0 then do; theta_phys   =Theta; phy4a_t   =Tscore
118      ! ; end;
119        if index(inst,"Ability to Participate in Social Roles/Activities")
120                                            > 0 then do; theta_sr     =Theta; social4a_t=Tscore
120      ! ; end;
121        if index(inst,"Fatigue")            > 0 then do; theta_fat    =Theta; fatig4a_t =Tscore
121      ! ; end;
122        if index(inst,"Anxiety/Fear")       > 0 then do;                      anx4a_t   =Tscore
122      ! ; end;
123        if index(inst,"Sleep Disturbance")  > 0 then do; theta_slp    =Theta; slpd4a_t  =Tscore
123      ! ; end;
124        if index(inst,"Cognitive Function") > 0 then do; theta_cog    =Theta; cog2_t    =Tscore
124      ! ; end;
125        
126        if last.assmnt then output;
127        run;

NOTE: There were 93 observations read from the data set WORK.AC.
NOTE: The data set WORK.PROPRDATA has 12 observations and 17 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

128        /**************************************************/
129        
130        

5 The SAS System                                                   14:51 Sunday, February 14, 2021

131        TITLE "Restructured results from AC"; run;
132        proc print data=PROPrData noobs;
133        	id pin;
134         var pain4a_t dep4a_t phy4a_t social4a_t fatig4a_t anx4a_t slpd4a_t cog2_t
135              theta_pain theta_dep theta_phys theta_sr theta_fat theta_slp theta_cog;
136        run;

NOTE: There were 12 observations read from the data set WORK.PROPRDATA.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.04 seconds
      cpu time            0.03 seconds

137        
138        
139        /***********************************************/
140        %include "C:\Projects\PROMIS-29\example\Generic MAUT code 2017_09_01.sas" /source2;
NOTE: %INCLUDE (level 1) file C:\Projects\PROMIS-29\example\Generic MAUT code 2017_09_01.sas is 
      file C:\Projects\PROMIS-29\example\Generic MAUT code 2017_09_01.sas.
141       +
142       + /*  DESCRIPTION
143       +   This is the multi-attribute utility function, using isotonic regression with linear
143      !+interpolation for the single-attribute (dis)utility functions.
144       +   This code was written by Janel Hanmer in September 2017 using SAS 9.4
145       +
146       +   DATASET
147       +   This code presumes the dataset's name is PROPrData
148       +
149       +   INPUTS
150       +   The input thetas must be a 7 element vector of the following form:
151       +     - theta_cog is a score on the Cognitive Functioning - Abilities domain
152       +     - theta_dep is a score on the Depression domain
153       +     - theta_fat is a score on the Fatigue domain
154       +     - theta_pain is a score on the Pain Interference domain
155       +     - theta_phys is a score on the Physical Functioning domain
156       +     - theta_slp is a score on the Sleep Disturbance domain
157       +     - theta_sr is a score on the Ability to Participate in Social Roles and Activities
157      !+ domain
158       +   The thetas must be of the z-score form: usually a number from -3 to 3.  These are
158      !+the scores constructed with a population mean of 0 and standard deviation of 1.
159       +   Note in particular, they should not be the "t-score" form.  These scores are
159      !+transformations of the z-scores such that the population mean is 50 and a standard
159      !+deviation of 10.
160       +
161       +   OUTPUTS
162       +   A number (utility) on the dead = 0, full health = 1 scale.
163       +   Note that 1 is the maximum possible value, but scores less than 0 are possible.
164       + */
165       +
166       +
167       + /*  The values we will need for the computation */
168       +

6 The SAS System                                                   14:51 Sunday, February 14, 2021

169       +data PROPrData; set PROPrData;
170       +  /* Coefficients for each turn points regression */
171       +
172       +turncog1 =-2.052;
173       +turncog2 =-1.565;
174       +turncog3 =-1.239;
175       +turncog4 =-0.902;
176       +turncog5 =-0.649;
177       +turncog6 =-0.367;
178       +turncog7 =-0.002;
179       +turncog8 =0.52;
180       +turncog9 =1.124;
181       +
182       +turndep1 =-1.082;
183       +turndep2 =-0.264;
184       +turndep3 =0.151;
185       +turndep4 =0.596;
186       +turndep5 =0.913;
187       +turndep6 =1.388;
188       +turndep7 =1.742;
189       +turndep8 =2.245;
190       +turndep9 =2.703;
191       +
192       +turnfat1 =-1.648;
193       +turnfat2 =-0.818;
194       +turnfat3 =-0.094;
195       +turnfat4 =0.303;
196       +turnfat5 =0.87;
197       +turnfat6 =1.124;
198       +turnfat7 =1.688;
199       +turnfat8 =2.053;
200       +turnfat9 =2.423;
201       +
202       +turnpain1 =-0.773;
203       +turnpain2 =0.1;
204       +turnpain3 =0.462;
205       +turnpain4 =0.827;
206       +turnpain5 =1.072;
207       +turnpain6 =1.407;
208       +turnpain7 =1.724;
209       +turnpain8 =2.169;
210       +turnpain9 =2.725;
211       +
212       +turnphys1 =-2.575;
213       +turnphys2 =-2.174;
214       +turnphys3 =-1.784;
215       +turnphys4 =-1.377;
216       +turnphys5 =-0.787;
217       +turnphys6 =-0.443;
218       +turnphys7 =-0.211;
219       +turnphys8 =0.16;
220       +turnphys9 =0.966;
221       +

7 The SAS System                                                   14:51 Sunday, February 14, 2021

222       +turnsleep1 =-1.535;
223       +turnsleep2 =-0.775;
224       +turnsleep3 =-0.459;
225       +turnsleep4 =0.093;
226       +turnsleep5 =0.335;
227       +turnsleep6 =0.82;
228       +turnsleep7 =1.659;
229       +turnsleep8 =1.934;
230       +
231       +turnsocial1 =-2.088;
232       +turnsocial2 =-1.634;
233       +turnsocial3 =-1.293;
234       +turnsocial4 =-0.955;
235       +turnsocial5 =-0.618;
236       +turnsocial6 =-0.276;
237       +turnsocial7 =0.083;
238       +turnsocial8 =0.494;
239       +turnsocial9 =1.221;
240       +
241       +  /* Coefficients for each slope regression */
242       +slopecog1 =-1.0047;
243       +slopecog2 =-0.1745;
244       +slopecog3 =-0.4223;
245       +slopecog4 =-0.1949;
246       +slopecog5 =-0.1082;
247       +slopecog6 =-0.2468;
248       +slopecog7 =-0.0176;
249       +slopecog8 =-0.2192;
250       +
251       +
252       +slopedep1 =0.1572;
253       +slopedep2 =0;
254       +slopedep3 =0.1793;
255       +slopedep4 =0.1817;
256       +slopedep5 =0.4109;
257       +slopedep6 =0.1887;
258       +slopedep7 =0.2115;
259       +slopedep8 =0.7983;
260       +
261       +
262       +slopefat1 =0.1152;
263       +slopefat2 =0.1077;
264       +slopefat3 =0.1189;
265       +slopefat4 =0.1277;
266       +slopefat5 =0.222;
267       +slopefat6 =0.0496;
268       +slopefat7 =0.3233;
269       +slopefat8 =1.3632;
270       +
271       +
272       +slopepain1 =0.0891;
273       +slopepain2 =0.1721;
274       +slopepain3 =0.1022;

8 The SAS System                                                   14:51 Sunday, February 14, 2021

275       +slopepain4 =0.4241;
276       +slopepain5 =0.3815;
277       +slopepain6 =0.3681;
278       +slopepain7 =0.1169;
279       +slopepain8 =0.7594;
280       +
281       +
282       +slopephys1 =-1.0761;
283       +slopephys2 =-0.1756;
284       +slopephys3 =-0.1764;
285       +slopephys4 =-0.1161;
286       +slopephys5 =-0.2721;
287       +slopephys6 =-0.4082;
288       +slopephys7 =-0.1695;
289       +slopephys8 =-0.1346;
290       +
291       +
292       +slopesleep1 =0.1241;
293       +slopesleep2 =0;
294       +slopesleep3 =0.0797;
295       +slopesleep4 =0.3455;
296       +slopesleep5 =0.3148;
297       +slopesleep6 =0.1238;
298       +slopesleep7 =1.8964;
299       +
300       +
301       +slopesocial1 =-1.1152;
302       +slopesocial2 =-0.2874;
303       +slopesocial3 =-0.1352;
304       +slopesocial4 =-0.132;
305       +slopesocial5 =-0.4012;
306       +slopesocial6 =0;
307       +slopesocial7 =-0.054;
308       +slopesocial8 =-0.201;
309       +
310       +
311       +  /* Coefficients for each intercept points regression */
312       +interceptcog1 =-1.0617;
313       +interceptcog2 =0.2375;
314       +interceptcog3 =-0.0694;
315       +interceptcog4 =0.1357;
316       +interceptcog5 =0.192;
317       +interceptcog6 =0.1411;
318       +interceptcog7 =0.1416;
319       +interceptcog8 =0.2464;
320       +
321       +
322       +interceptdep1 =0.1701;
323       +interceptdep2 =0.1286;
324       +interceptdep3 =0.1015;
325       +interceptdep4 =0.1001;
326       +interceptdep5 =-0.1092;
327       +interceptdep6 =0.1993;

9 The SAS System                                                   14:51 Sunday, February 14, 2021

328       +interceptdep7 =0.1595;
329       +interceptdep8 =-1.1577;
330       +
331       +
332       +interceptfat1 =0.1898;
333       +interceptfat2 =0.1837;
334       +interceptfat3 =0.1848;
335       +interceptfat4 =0.1821;
336       +interceptfat5 =0.1;
337       +interceptfat6 =0.2938;
338       +interceptfat7 =-0.1681;
339       +interceptfat8 =-2.3031;
340       +
341       +
342       +interceptpain1 =0.0689;
343       +interceptpain2 =0.0606;
344       +interceptpain3 =0.0929;
345       +interceptpain4 =-0.1733;
346       +interceptpain5 =-0.1277;
347       +interceptpain6 =-0.1089;
348       +interceptpain7 =0.3243;
349       +interceptpain8 =-1.0692;
350       +
351       +
352       +interceptphys1 =-1.7709;
353       +interceptphys2 =0.1867;
354       +interceptphys3 =0.1853;
355       +interceptphys4 =0.2683;
356       +interceptphys5 =0.1456;
357       +interceptphys6 =0.0853;
358       +interceptphys7 =0.1356;
359       +interceptphys8 =0.13;
360       +
361       +
362       +interceptsleep1 =0.1905;
363       +interceptsleep2 =0.0943;
364       +interceptsleep3 =0.1309;
365       +interceptsleep4 =0.1062;
366       +interceptsleep5 =0.1164;
367       +interceptsleep6 =0.2731;
368       +interceptsleep7 =-2.6676;
369       +
370       +
371       +interceptsocial1 =-1.3285;
372       +interceptsocial2 =0.0241;
373       +interceptsocial3 =0.2209;
374       +interceptsocial4 =0.2239;
375       +interceptsocial5 =0.0576;
376       +interceptsocial6 =0.1683;
377       +interceptsocial7 =0.1728;
378       +interceptsocial8 =0.2454;
379       +
380       +

10 The SAS System                                                  14:51 Sunday, February 14, 2021

381       +
382       +
383       + /*  Corner state disutilities*/
384       +  c_cognition = 0.6350450;
385       +  c_depression = 0.6661641;
386       +  c_fatigue = 0.6386135;
387       +  c_pain = 0.6529680;
388       +  c_physical = 0.6883584;
389       +  c_sleep = 0.5629657;
390       +  c_social = 0.6112686;
391       +  C = -0.9991828;
392       +
393       + /*  Constant for transforming from pits to dead */
394       +  to_dead = 1.021915;
395       +
396       +
397       + /*  Create the output of each single-domain function*/
398       +
399       + /*  Cognition Disutility.  Higher cognition scores are better.*/
400       +  cog_disutility = 1;
401       +  if turncog1<=theta_cog<turncog2 then cog_disutility = interceptcog1 + theta_cog *
401      !+slopecog1;
402       +  if turncog2<=theta_cog<turncog3 then cog_disutility = interceptcog2 + theta_cog *
402      !+slopecog2;
403       +  if turncog3<=theta_cog<turncog4 then cog_disutility = interceptcog3 + theta_cog *
403      !+slopecog3;
404       +  if turncog4<=theta_cog<turncog5 then cog_disutility = interceptcog4 + theta_cog *
404      !+slopecog4;
405       +  if turncog5<=theta_cog<turncog6 then cog_disutility = interceptcog5 + theta_cog *
405      !+slopecog5;
406       +  if turncog6<=theta_cog<turncog7 then cog_disutility = interceptcog6 + theta_cog *
406      !+slopecog6;
407       +  if turncog7<=theta_cog<turncog8 then cog_disutility = interceptcog7 + theta_cog *
407      !+slopecog7;
408       +  if turncog8<=theta_cog<turncog9 then cog_disutility = interceptcog8 + theta_cog *
408      !+slopecog8;
409       +  if turncog9<=theta_cog then cog_disutility = 0;
410       +
411       + /*  Depression Disutility.  Lower depression scores are better*/
412       +  dep_disutility=0;
413       +  if turndep1<=theta_dep<turndep2 then dep_disutility = interceptdep1 + theta_dep *
413      !+slopedep1;
414       +  if turndep2<=theta_dep<turndep3 then dep_disutility = interceptdep2 + theta_dep *
414      !+slopedep2;
415       +  if turndep3<=theta_dep<turndep4 then dep_disutility = interceptdep3 + theta_dep *
415      !+slopedep3;
416       +  if turndep4<=theta_dep<turndep5 then dep_disutility = interceptdep4 + theta_dep *
416      !+slopedep4;
417       +  if turndep5<=theta_dep<turndep6 then dep_disutility = interceptdep5 + theta_dep *
417      !+slopedep5;
418       +  if turndep6<=theta_dep<turndep7 then dep_disutility = interceptdep6 + theta_dep *
418      !+slopedep6;
419       +  if turndep7<=theta_dep<turndep8 then dep_disutility = interceptdep7 + theta_dep *

11 The SAS System                                                  14:51 Sunday, February 14, 2021

419      !+slopedep7;
420       +  if turndep8<=theta_dep<turndep9 then dep_disutility = interceptdep8 + theta_dep *
420      !+slopedep8;
421       +  if turndep9<=theta_dep then dep_disutility = 1;
422       +
423       +
424       + /*  Fatigue Disutility.  Lower fatigue scores are better*/
425       +  fat_disutility=0;
426       +  if turnfat1<=theta_fat<turnfat2 then fat_disutility = interceptfat1 + theta_fat *
426      !+slopefat1;
427       +  if turnfat2<=theta_fat<turnfat3 then fat_disutility = interceptfat2 + theta_fat *
427      !+slopefat2;
428       +  if turnfat3<=theta_fat<turnfat4 then fat_disutility = interceptfat3 + theta_fat *
428      !+slopefat3;
429       +  if turnfat4<=theta_fat<turnfat5 then fat_disutility = interceptfat4 + theta_fat *
429      !+slopefat4;
430       +  if turnfat5<=theta_fat<turnfat6 then fat_disutility = interceptfat5 + theta_fat *
430      !+slopefat5;
431       +  if turnfat6<=theta_fat<turnfat7 then fat_disutility = interceptfat6 + theta_fat *
431      !+slopefat6;
432       +  if turnfat7<=theta_fat<turnfat8 then fat_disutility = interceptfat7 + theta_fat *
432      !+slopefat7;
433       +  if turnfat8<=theta_fat<turnfat9 then fat_disutility = interceptfat8 + theta_fat *
433      !+slopefat8;
434       +  if turnfat9<=theta_fat then fat_disutility = 1;
435       +
436       +
437       + /*  Pain Disutility.  Lower pain scores are better*/
438       +  pain_disutility=0;
439       +  if turnpain1<=theta_pain<turnpain2 then pain_disutility = interceptpain1 + theta_pain
439      !+ * slopepain1;
440       +  if turnpain2<=theta_pain<turnpain3 then pain_disutility = interceptpain2 + theta_pain
440      !+ * slopepain2;
441       +  if turnpain3<=theta_pain<turnpain4 then pain_disutility = interceptpain3 + theta_pain
441      !+ * slopepain3;
442       +  if turnpain4<=theta_pain<turnpain5 then pain_disutility = interceptpain4 + theta_pain
442      !+ * slopepain4;
443       +  if turnpain5<=theta_pain<turnpain6 then pain_disutility = interceptpain5 + theta_pain
443      !+ * slopepain5;
444       +  if turnpain6<=theta_pain<turnpain7 then pain_disutility = interceptpain6 + theta_pain
444      !+ * slopepain6;
445       +  if turnpain7<=theta_pain<turnpain8 then pain_disutility = interceptpain7 + theta_pain
445      !+ * slopepain7;
446       +  if turnpain8<=theta_pain<turnpain9 then pain_disutility = interceptpain8 + theta_pain
446      !+ * slopepain8;
447       +  if turnpain9<=theta_pain then pain_disutility = 1;
448       +
449       +
450       + /*  Physical Disutility.  higher physical function scores are better*/
451       +  physical_disutility=1;
452       +  if turnphys1<=theta_phys<turnphys2 then physical_disutility = interceptphys1 +
452      !+theta_phys * slopephys1;
453       +  if turnphys2<=theta_phys<turnphys3 then physical_disutility = interceptphys2 +

12 The SAS System                                                  14:51 Sunday, February 14, 2021

453      !+theta_phys * slopephys2;
454       +  if turnphys3<=theta_phys<turnphys4 then physical_disutility = interceptphys3 +
454      !+theta_phys * slopephys3;
455       +  if turnphys4<=theta_phys<turnphys5 then physical_disutility = interceptphys4 +
455      !+theta_phys * slopephys4;
456       +  if turnphys5<=theta_phys<turnphys6 then physical_disutility = interceptphys5 +
456      !+theta_phys * slopephys5;
457       +  if turnphys6<=theta_phys<turnphys7 then physical_disutility = interceptphys6 +
457      !+theta_phys * slopephys6;
458       +  if turnphys7<=theta_phys<turnphys8 then physical_disutility = interceptphys7 +
458      !+theta_phys * slopephys7;
459       +  if turnphys8<=theta_phys<turnphys9 then physical_disutility = interceptphys8 +
459      !+theta_phys * slopephys8;
460       +  if turnphys9<=theta_phys then physical_disutility = 0;
461       +
462       +
463       + /*  Sleep Disutility.  Lower sleep disturbance scores are better*/
464       +  sleep_disutility=0;
465       +  if turnsleep1<=theta_slp<turnsleep2 then sleep_disutility = interceptsleep1 +
465      !+theta_slp * slopesleep1;
466       +  if turnsleep2<=theta_slp<turnsleep3 then sleep_disutility = interceptsleep2 +
466      !+theta_slp * slopesleep2;
467       +  if turnsleep3<=theta_slp<turnsleep4 then sleep_disutility = interceptsleep3 +
467      !+theta_slp * slopesleep3;
468       +  if turnsleep4<=theta_slp<turnsleep5 then sleep_disutility = interceptsleep4 +
468      !+theta_slp * slopesleep4;
469       +  if turnsleep5<=theta_slp<turnsleep6 then sleep_disutility = interceptsleep5 +
469      !+theta_slp * slopesleep5;
470       +  if turnsleep6<=theta_slp<turnsleep7 then sleep_disutility = interceptsleep6 +
470      !+theta_slp * slopesleep6;
471       +  if turnsleep7<=theta_slp<turnsleep8 then sleep_disutility = interceptsleep7 +
471      !+theta_slp * slopesleep7;
472       +  if turnsleep8<=theta_slp then sleep_disutility = 1;
473       +
474       + /*  Social Disutility.  Higher social scores are better*/
475       +  social_disutility=1;
476       +  if turnsocial1<=theta_sr<turnsocial2 then social_disutility = interceptsocial1 +
476      !+theta_sr * slopesocial1;
477       +  if turnsocial2<=theta_sr<turnsocial3 then social_disutility = interceptsocial2 +
477      !+theta_sr * slopesocial2;
478       +  if turnsocial3<=theta_sr<turnsocial4 then social_disutility = interceptsocial3 +
478      !+theta_sr * slopesocial3;
479       +  if turnsocial4<=theta_sr<turnsocial5 then social_disutility = interceptsocial4 +
479      !+theta_sr * slopesocial4;
480       +  if turnsocial5<=theta_sr<turnsocial6 then social_disutility = interceptsocial5 +
480      !+theta_sr * slopesocial5;
481       +  if turnsocial6<=theta_sr<turnsocial7 then social_disutility = interceptsocial6 +
481      !+theta_sr * slopesocial6;
482       +  if turnsocial7<=theta_sr<turnsocial8 then social_disutility = interceptsocial7 +
482      !+theta_sr * slopesocial7;
483       +  if turnsocial8<=theta_sr<turnsocial9 then social_disutility = interceptsocial8 +
483      !+theta_sr * slopesocial8;
484       +  if turnsocial9<=theta_sr then social_disutility = 0;

13 The SAS System                                                  14:51 Sunday, February 14, 2021

485       +
486       +
487       + /*  Now, plug it into the multiattribute disutility function */
488       +
489       +  multi_attribute_disutility = (1/C) * ((1 + C * c_cognition * cog_disutility)*
490       +                                              (1 + C * c_depression * dep_disutility)*
491       +                                              (1 + C * c_fatigue * fat_disutility)*
492       +                                              (1 + C * c_pain * pain_disutility)*
493       +                                              (1 + C * c_physical *
493      !+physical_disutility)*
494       +                                              (1 + C * c_sleep * sleep_disutility)*
495       +                                              (1 + C * c_social * social_disutility) -
495      !+1);
496       +
497       +
498       +  /* Now make it a utility, on the dead/full health scale */
499       +  PROPr = round (1 - to_dead * multi_attribute_disutility, 0.001);
500       +run;

NOTE: There were 12 observations read from the data set WORK.PROPRDATA.
NOTE: The data set WORK.PROPRDATA has 12 observations and 207 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

501       +
502       +  /* single attribute utility functions */
503       +
504       +data PROPrData; set PROPrData;
505       +	cognition_utility = round (1 - cog_disutility, 0.001);
506       +	depression_utility = round (1 - dep_disutility, 0.001);
507       +	fatigue_utility = round (1 - fat_disutility, 0.001);
508       +	pain_utility = round (1 - pain_disutility, 0.001);
509       +	physical_utility = round (1 - physical_disutility, 0.001);
510       +	sleep_utility = round (1 - sleep_disutility, 0.001);
511       +	social_utility = round (1 - social_disutility, 0.001); run;

NOTE: There were 12 observations read from the data set WORK.PROPRDATA.
NOTE: The data set WORK.PROPRDATA has 12 observations and 214 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

512       +
513       +
514       +/* clean up dataset */
515       +data PROPrData; set PROPrData;
516       + drop multi_attribute_disutility  to_dead
517       + turncog1 	turncog2 	turncog3 	turncog4 	turncog5 	turncog6 	turncog7 	turncog8
517      !+	turncog9 		turndep1 	turndep2 	turndep3 	turndep4 	turndep5 	turndep6 	turndep7
517      !+	turndep8 	turndep9 		turnfat1 	turnfat2 	turnfat3 	turnfat4 	turnfat5 	turnfat6

14 The SAS System                                                  14:51 Sunday, February 14, 2021

517      !+	turnfat7 	turnfat8 	turnfat9 		turnpain1 	turnpain2 	turnpain3 	turnpain4 	turnpain5
517      !+	turnpain6 	turnpain7 	turnpain8 	turnpain9 		turnphys1 	turnphys2 	turnphys3
517      !+	turnphys4 	turnphys5 	turnphys6 	turnphys7 	turnphys8 	turnphys9 		turnsleep1
517      !+	turnsleep2 	turnsleep3 	turnsleep4 	turnsleep5 	turnsleep6 	turnsleep7 	turnsleep8
517      !+		turnsocial1 	turnsocial2 	turnsocial3 	turnsocial4 	turnsocial5 	turnsocial6
517      !+	turnsocial7 	turnsocial8 	turnsocial9
518       +slopecog1 	slopecog2 	slopecog3 	slopecog4 	slopecog5 	slopecog6 	slopecog7 	slopecog8
518      !+			slopedep1 	slopedep2 	slopedep3 	slopedep4 	slopedep5 	slopedep6 	slopedep7
518      !+	slopedep8 			slopefat1 	slopefat2 	slopefat3 	slopefat4 	slopefat5 	slopefat6
518      !+	slopefat7 	slopefat8 			slopepain1 	slopepain2 	slopepain3 	slopepain4 	slopepain5
518      !+	slopepain6 	slopepain7 	slopepain8 			slopephys1 	slopephys2 	slopephys3 	slopephys4
518      !+	slopephys5 	slopephys6 	slopephys7 	slopephys8 			slopesleep1 	slopesleep2
518      !+	slopesleep3 	slopesleep4 	slopesleep5 	slopesleep6 	slopesleep7 			slopesocial1
518      !+	slopesocial2 	slopesocial3 	slopesocial4 	slopesocial5 	slopesocial6 	slopesocial7
518      !+	slopesocial8 	
519       +interceptcog1 	interceptcog2 	interceptcog3 	interceptcog4 	interceptcog5
519      !+	interceptcog6 	interceptcog7 	interceptcog8 	interceptdep1 	interceptdep2
519      !+	interceptdep3 	interceptdep4 	interceptdep5 	interceptdep6 	interceptdep7
519      !+	interceptdep8 			interceptfat1 	interceptfat2 	interceptfat3 	interceptfat4
519      !+	interceptfat5 	interceptfat6 	interceptfat7 	interceptfat8 			interceptpain1
519      !+	interceptpain2 	interceptpain3 	interceptpain4 	interceptpain5 	interceptpain6
519      !+	interceptpain7 	interceptpain8 			interceptphys1 	interceptphys2 	interceptphys3
519      !+	interceptphys4 	interceptphys5 	interceptphys6 	interceptphys7 	interceptphys8
519      !+			interceptsleep1 	interceptsleep2 	interceptsleep3 	interceptsleep4 	interceptsleep5
519      !+	interceptsleep6 	interceptsleep7 			interceptsocial1 	interceptsocial2
519      !+	interceptsocial3 	interceptsocial4 	interceptsocial5 	interceptsocial6
519      !+	interceptsocial7 	interceptsocial8 	
520       +c_cognition c_depression c_fatigue c_pain c_physical c_sleep c_social c
521       +cog_disutility dep_disutility fat_disutility pain_disutility physical_disutility
521      !+sleep_disutility social_disutility; run;

NOTE: There were 12 observations read from the data set WORK.PROPRDATA.
NOTE: The data set WORK.PROPRDATA has 12 observations and 25 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

NOTE: %INCLUDE (level 1) ending.
522        
523        data PROPrData; set PROPrData;
524        label PROPr="PROPr (MAUT J Hanmer, Sept 2017)";
525        run;

NOTE: There were 12 observations read from the data set WORK.PROPRDATA.
NOTE: The data set WORK.PROPRDATA has 12 observations and 25 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

526        
527        TITLE "PROPr"; run;

15 The SAS System                                                  14:51 Sunday, February 14, 2021

528        proc means data=PROPrData(drop=pin assmnt) maxdec=2;
529        *class assmnt;
530        var theta_pain theta_dep theta_phys theta_sr theta_fat theta_slp theta_cog
531        pain_utility depression_utility physical_utility social_utility fatigue_utility
532        sleep_utility cognition_utility PROPr;
533        run;

NOTE: There were 12 observations read from the data set WORK.PROPRDATA.
NOTE: The PROCEDURE MEANS printed page 2.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds

534        /***********************************************/
535        
536        
537        
538        /***********************************************/
539        * pick up single-item 0-10 pain intensity item from original dataset;
540        
541        DATA pain;
542         set library.prom29plus2(keep=pin assmnt global07);
543        run;

NOTE: There were 12 observations read from the data set LIBRARY.PROM29PLUS2.
NOTE: The data set WORK.PAIN has 12 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

544        proc sort data=pain; by pin assmnt; run;

NOTE: There were 12 observations read from the data set WORK.PAIN.
NOTE: The data set WORK.PAIN has 12 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

545        
546        
547        data all; merge PROPrData pain; by pin assmnt;
548        	
549        * create Z-score for pain_average using PROMIS Wave 1 general population mean=2.31,
549      ! sd=2.34;
550        pain1_z   = (global07 - 2.31)/2.34;
551        
552        * create Z-scores from T;
553        pain4a_z    = (pain4a_t   - 50)/10;
554        dep4a_z     = (dep4a_t    - 50)/10;
555        phy4a_z     = (phy4a_t    - 50)/10;

16 The SAS System                                                  14:51 Sunday, February 14, 2021

556        social4a_z  = (social4a_t - 50)/10;
557        fatig4a_z   = (fatig4a_t  - 50)/10;
558        anx4a_z     = (anx4a_t    - 50)/10;
559        slpd4a_z    = (slpd4a_t   - 50)/10;	
560        cog2_z      = (cog2_t     - 50)/10;	
561        
562        *compute composite for pain interference and pain intensity using Z-scores;
563        painav_z  = mean(of pain4a_z pain1_z);
564        
565        * compute composite for emotion using anxiety and depression Z-scores;
566        emot_z    = mean(of anx4a_z dep4a_z);
567        
568        * create T-score versions;
569        pain1_t   = 50 + (pain1_z * 10);
570        painav_t  = 50 + (painav_z * 10);
571        emot_t    = 50 + (emot_z * 10);
572        
573        
574        label
575        painav_z  ="pain composite (Z)"
576        emot_z    ="anxiety/dep composite (Z)"
577        painav_t  ="pain composite (T)"
578        emot_t    ="anxiety/dep composite (T)"
579        
580        social4a_z="Ability to Part in Soc Roles/Activ (Z)"
581        anx4a_z   ="Anxiety/Fear (Z)"
582        dep4a_z   ="Depression/Sadness (Z)"
583        fatig4a_z ="Fatigue (Z)"
584        pain4a_z  ="Pain Interference (Z)"
585        phy4a_z   ="Physical Function (Z)"
586        slpd4a_z  ="Sleep Disturbance (Z)"
587        pain1_z   ="Pain intensity (Z)"
588        
589        social4a_t="Ability to Part in Soc Roles/Activ (T)"
590        anx4a_t   ="Anxiety/Fear (T)"
591        dep4a_t   ="Depression/Sadness (T)"
592        fatig4a_t ="Fatigue (T)"
593        pain4a_t  ="Pain Interference (T)"
594        phy4a_t   ="Physical Function (T)"
595        slpd4a_t  ="Sleep Disturbance (T)"
596        pain1_t   ="Pain intensity (T)"
597        ;
598        
599        
600        /* factor scoring coefficients from "PROMIS-29 V2.0 Physical and
601           Mental Health Summary Scores" - Hays/Spritzer/Schalet/Cella
602        
603        ph_phyfun=    0.872 ;     mh_phyfun= -0.015 ;
604        ph_painav=   -0.094 ;     mh_painav= -0.154 ;
605        ph_social=    0.113 ;     mh_social=  0.252 ;
606        ph_fatig =   -0.009 ;     mh_fatig = -0.351 ;
607        ph_sleep =    0.002 ;     mh_sleep = -0.139 ;
608        ph_emot  =    0.003 ;     mh_emot  = -0.257 ;

17 The SAS System                                                  14:51 Sunday, February 14, 2021

609        */
610        
611        
612        /* multiple z-scores with corresponding factor scoring coefficient */
613        ph29_z=(phy4a_z    *  0.872) +
614               (painav_z   * -0.094) +
615               (social4a_z *  0.113) +
616               (fatig4a_z  * -0.009) +
617               (slpd4a_z   *  0.002) +
618               (emot_z     *  0.003);
619        
620        mh29_z=(phy4a_z    * -0.015) +
621               (painav_z   * -0.154) +
622               (social4a_z *  0.252) +
623               (fatig4a_z  * -0.351) +
624               (slpd4a_z   * -0.139) +
625               (emot_z     * -0.257);
626        
627        * create T-score versions: ;
628        ph29_t= 50 + (ph29_z * 10);
629        mh29_t= 50 + (mh29_z * 10);
630        
631        label
632        ph29_z="PROMIS29 v2.0 PH summary (Z)"
633        mh29_z="PROMIS29 v2.0 MH summary (Z)"
634        
635        ph29_t="PROMIS29 v2.0 PH summary (T)"
636        mh29_t="PROMIS29 v2.0 MH summary (T)";
637        
638        run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      3 at 560:27   
NOTE: There were 12 observations read from the data set WORK.PROPRDATA.
NOTE: There were 12 observations read from the data set WORK.PAIN.
NOTE: The data set WORK.ALL has 12 observations and 44 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

639        
640        TITLE "Score29"; run;
641        proc means  data=all maxdec=2;
642        var 	ph29_t mh29_t phy4a_t painav_t social4a_t fatig4a_t slpd4a_t emot_t
643            anx4a_t dep4a_t pain4a_t pain1_t ;
644        *class assmnt;
645        run;

NOTE: There were 12 observations read from the data set WORK.ALL.
NOTE: The PROCEDURE MEANS printed page 3.
NOTE: PROCEDURE MEANS used (Total process time):

18 The SAS System                                                  14:51 Sunday, February 14, 2021

      real time           0.00 seconds
      cpu time            0.00 seconds

646        TITLE "Score29 at assessment 1 - correlations"; run;
647        proc corr data=all; where assmnt=1;
648        var 	ph29_t mh29_t phy4a_t painav_t social4a_t fatig4a_t slpd4a_t emot_t
649            anx4a_t dep4a_t pain4a_t pain1_t PROPr;
650        run;

NOTE: The PROCEDURE CORR printed pages 4-7.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.04 seconds
      cpu time            0.04 seconds

651        *-------------------------------------------------------------;

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           0.79 seconds
      cpu time            0.71 seconds