1                                                        The SAS System                          12:42 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.25 seconds
      cpu time            0.20 seconds
      
1          options ls=132 ps=53 nocenter;
2          ods pdf file="C:\projects\PROMIS-29\example\export29+2.pdf";
NOTE: Writing ODS PDF output to DISK destination "C:\projects\PROMIS-29\example\export29+2.pdf", printer "PDF".
3          **************************************************************;
4          ** read in sample data and make adjustments for AC scoring;
5          ** export to prom29plus2.csv for processing;
6          **************************************************************;
7          DATA prom29plus2;
8          INPUT ID 1-2
9          PFA11 3
10         PFA21 4
11         PFA23 5
12         PFA53 6
13         EDANX01  7
14         EDANX40  8
15         EDANX41  9
16         EDANX53 10
17         EDDEP04 11
18         EDDEP06 12
19         EDDEP29 13
20         EDDEP41 14
21         HI7      15
22         AN3      16
23         FATEXP41 17
24         FATEXP40 18
25         SLEEP109 19
26         SLEEP116 20
27         SLEEP20  21
28         SLEEP44  22

2 The SAS System                                                                                     12:42 Sunday, February 14, 2021

29         SRPPER11 23
30         SRPPER18 24
31         SRPPER23 25
32         SRPPER46 26
33         PAININ9  27
34         PAININ22 28
35         PAININ31 29
36         PAININ34 30
37         PC6R  31
38         PC27R 32
39         GLOBAL07 33-34
40         ;
41         CARDS;

NOTE: The data set WORK.PROM29PLUS2 has 12 observations and 32 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

54         ;
55         RUN;
56         ************************;
57         
58         libname save "C:\projects\PROMIS-29\example";
NOTE: Libref SAVE was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\projects\PROMIS-29\example
59         
60         ************************;
61         DATA save.prom29plus2; SET prom29plus2;
62         * rename items for use by Assessment Center;	
63         rename
64         id       = pin
65         SRPPER11 = SRPPER11_CaPS
66         SRPPER18 = SRPPER18_CaPS
67         SRPPER23 = SRPPER23_CaPS
68         SRPPER46 = SRPPER46_CaPS;
69         
70         * only one timepoint in this example: set up ASSMNT variable;
71         assmnt=1;
72         run;

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

73         

3 The SAS System                                                                                     12:42 Sunday, February 14, 2021

74         
75         DATA prom29plus2; SET save.prom29plus2;
76         	
77         PHYFUN4=MEAN(PFA11,PFA21,PFA23,PFA53)*4;
78         ANX4   =MEAN(EDANX01,EDANX40,EDANX41,EDANX53)*4;
79         DEP4   =MEAN(EDDEP04,EDDEP06,EDDEP29,EDDEP41)*4;
80         FAT4   =MEAN(HI7,AN3,FATEXP41,FATEXP40)*4;
81         SLPD4  =MEAN(SLEEP109,SLEEP116,SLEEP20,SLEEP44)*4;
82         SOC4   =MEAN(SRPPER11_CaPS,SRPPER18_CaPS,SRPPER23_CaPS,SRPPER46_CaPS)*4;
83         PAIN4  =MEAN(PAININ9,PAININ22,PAININ31,PAININ34)*4;
84         CF2    =MEAN(PC6R,PC27R)*2;
85         
86         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 84:9    3 at 84:25   
NOTE: There were 12 observations read from the data set SAVE.PROM29PLUS2.
NOTE: The data set WORK.PROM29PLUS2 has 12 observations and 41 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

87         ************************************************************;
88         PROC SORT data=prom29plus2; BY pin; RUN;

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

89         ***********************************************************;
90         TITLE "Overall means"; run;
91         proc means maxdec=0 data=prom29plus2; var
92         PHYFUN4 PFA11 PFA21 PFA23 PFA53
93         ANX4    EDANX01 EDANX40 EDANX41 EDANX53
94         DEP4    EDDEP04 EDDEP06 EDDEP29 EDDEP41
95         FAT4    HI7 AN3 FATEXP41 FATEXP40
96         SLPD4   SLEEP109 SLEEP116 SLEEP20 SLEEP44
97         SOC4    SRPPER11_CaPS SRPPER18_CaPS SRPPER23_CaPS SRPPER46_CaPS
98         PAIN4   PAININ9 PAININ22 PAININ31 PAININ34
99         CF2     PC6R PC27R
100        global07;
101        run;

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

4 The SAS System                                                                                     12:42 Sunday, February 14, 2021

      real time           0.04 seconds
      cpu time            0.03 seconds

102        ***********************************************************;
103        TITLE "Look at correlation among scales"; run;
104        proc corr data=prom29plus2;
105        	var phyfun4 anx4 dep4 fat4 slpd4 soc4 pain4 cf2 global07;
106        run;

NOTE: The PROCEDURE CORR printed pages 2-3.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds

107        ***********************************************************;
108        
109        
110        /** check scales **/
111        %macro alph(scale, items);
112        TITLE "&scale"; run;
113        proc corr alpha nomiss data=prom29plus2;
114        	var &items;
115        run;	
116        %mend;
117        
118        %alph(PHYFUN4 ,PFA11 PFA21 PFA23 PFA53);

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

119        %alph(ANX4    ,EDANX01 EDANX40 EDANX41 EDANX53);

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

120        %alph(DEP4    ,EDDEP04 EDDEP06 EDDEP29 EDDEP41);

NOTE: The PROCEDURE CORR printed pages 8-9.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.02 seconds
      cpu time            0.03 seconds

5 The SAS System                                                                                     12:42 Sunday, February 14, 2021

121        %alph(FAT4    ,HI7 AN3 FATEXP41 FATEXP40);

NOTE: The PROCEDURE CORR printed pages 10-11.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

122        %alph(SLPD4   ,SLEEP109 SLEEP116 SLEEP20 SLEEP44);

NOTE: The PROCEDURE CORR printed pages 12-13.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

123        %alph(SOC4    ,SRPPER11_CaPS SRPPER18_CaPS SRPPER23_CaPS SRPPER46_CaPS);

NOTE: The PROCEDURE CORR printed pages 14-15.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

124        %alph(PAIN4   ,PAININ9 PAININ22 PAININ31 PAININ34);

NOTE: The PROCEDURE CORR printed pages 16-17.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

125        %alph(CF2     ,PC6R PC27R);

NOTE: The PROCEDURE CORR printed page 18.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

126        
127        TITLE "Look at SLEEP alpha without inconsistent case (pin NE 5)"; run;
128        proc corr alpha nomiss data=prom29plus2; where pin ne 5;
129        	var SLEEP109 SLEEP116 SLEEP20 SLEEP44;
130        run;

NOTE: The PROCEDURE CORR printed pages 19-20.
NOTE: PROCEDURE CORR used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

6 The SAS System                                                                                     12:42 Sunday, February 14, 2021

131        
132        ***********************************************************;
133        
134        /* size limitation in AC */
135        /* not relevant for this case, but may need to break up your data into separate batches */
136        /* refer to AC manual:
137         https://www.assessmentcenter.net/ac_scoringservice/templates/UserManual.pdf) */
138        /*
139        data prom29plus2; set prom29plus2;
140        	if _N_ <= 4000;
141        run;
142        */
143        
144        
145        ***********************************************************;
146        /* convert items to character variables (i1-i31) to change SAS . to blanks for use in AC
147         (AC requires missing to be blank or value of 'SKIP' - refer to AC manual:
148         https://www.assessmentcenter.net/ac_scoringservice/templates/UserManual.pdf)
149        */
150        
151        data prom29plus2; length i1-i30 $1. i31 $2.; set prom29plus2;
152        array invar
153              pfa11 pfa21 pfa23 pfa53
154              edanx01 edanx40 edanx41 edanx53
155              eddep04 eddep06 eddep29 eddep41
156              hi7 an3 fatexp41 fatexp40
157              sleep109 sleep116 sleep20 sleep44
158              srpper11_caps srpper18_caps srpper23_caps srpper46_caps
159              painin9 painin22 painin31 painin34
160              pc6r pc27r;
161        array outvar $ i1-i30;
162        
163        do over invar;
164        if invar > . then outvar=put(invar,$1.);
WARNING: Character format specified for the result of a numeric expression.
165           else outvar=" ";
166        end;
167        
168        if global07 > . then i31=put(global07,$2.);
WARNING: Variable GLOBAL07 has already been defined as numeric.
169           else i31="  ";
170        run;

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

7 The SAS System                                                                                     12:42 Sunday, February 14, 2021

171        /*proc contents data=prom29plus2; run;*/
172        
173        TITLE "Check a few recodes" ; run;
174        proc freq data=prom29plus2;
175        	tables
176        	pfa11*i1
177        	pfa21*i2
178        	pfa23*i3
179        	pfa53*i4
180             edanx01*i5
181             edanx40*i6
182             edanx41*i7
183             edanx53*i8
184             eddep04*i9
185             eddep06*i10
186             eddep29*i11
187             eddep41*i12
188             hi7*i13
189             an3*i14
190             fatexp41*i15
191             fatexp40*i16
192             sleep109*i17
193             sleep116*i18
194             sleep20*i19
195             sleep44*i20
196        	srpper11_caps*i21
197        	srpper18_caps*i22
198        	srpper23_caps*i23
199        	srpper46_caps*i24
200        	painin9*i25
201        	painin22*i26
202        	painin31*i27
203        	painin34*i28
204        	pc6r*i29
205        	pc27r*i30
206        	global07*i31
207        /list missing;
208        run;

NOTE: There were 12 observations read from the data set WORK.PROM29PLUS2.
NOTE: The PROCEDURE FREQ printed pages 21-26.
NOTE: PROCEDURE FREQ used (Total process time):
      real time           0.16 seconds
      cpu time            0.15 seconds

209        
210        	
211        /* output header and data to file prom29plus2.csv */
212        data _null_; file "prom29plus2.csv" dlm=","; set prom29plus2;
213        if _N_=1 then put @1

8 The SAS System                                                                                     12:42 Sunday, February 14, 2021

214        "PIN,Assmnt,pfa11,pfa21,pfa23,pfa53,edanx01,edanx40,edanx41,edanx53,eddep04,eddep06,eddep29,eddep41,
215        hi7,an3,fatexp41,fatexp40,sleep109,sleep116,sleep20,sleep44,srpper11_caps,srpper18_caps,srpper23_caps,srpper46_caps,
216        painin9,painin22,painin31,painin34,pc6r,pc27r,global07";
WARNING: The quoted string currently being processed has become more than 262 characters long.  You might have unbalanced quotation 
         marks.
217        
218        put @1 PIN assmnt i1-i31;
219        run;

NOTE: The file "prom29plus2.csv" is:
      Filename=C:\Projects\PROMIS-29\example\prom29plus2.csv,
      RECFM=V,LRECL=32767,File Size (bytes)=0,
      Last Modified=14Feb2021:12:42:57,
      Create Time=14Feb2021:12:36:24

NOTE: 13 records were written to the file "prom29plus2.csv".
      The minimum record length was 65.
      The maximum record length was 269.
NOTE: There were 12 observations read from the data set WORK.PROM29PLUS2.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

220        
221        ***********************************************************;
222        
223        ods pdf close;
NOTE: ODS PDF printed 27 pages to C:\projects\PROMIS-29\example\export29+2.pdf.
224        ***********************************************************;

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