81 *** ST210A_U; 82 **** 'C:\sasjobs\stat210\jl2003; 83 84 filename qqplot 'C:\sasjobs\stat210\jl2003\qqplot.sas'; 85 %include qqplot; 134 135 ** NEUROBLASTOMA DATA -- TWO GROUPS -- QUANTITATIVE MEASURES; 136 ** 137 ** Besides the leukemias, neuroblastoma constitutes the *; 138 ** most common solid tumor of childhood. Many neuroblastomas are *; 139 ** functional, producing elevated levels of serum and uninary *; 140 ** catecholamines. Radioenzymatic methods permit a quantitation of *; 141 ** catecholamines and that of their precursor amino acid, dopa, in *; 142 ** plasma and other body fluids. A researcher was interested in *; 143 ** using the radioenzymatic assay of dopa as a diagnostic test for *; 144 ** children with neuroblastoma versus other solid tumors. Dopa was *; 145 ** measured in the plasma of 15 children with a biopsy proven *; 146 ** diagnosis of neuroblastoma. Dopa was also measured in the plasma *; 147 ** of 18 children with solid tumors but without a diagnosis of neur- *; 148 ** oblastoma (control group). *; 149 ** *; 150 DATA ONE; INPUT GROUP $ I DOPA LNDOPA; 151 title1 'NEUROBLASTOMA DATA -- TWO GROUPS -- QUANTITATIVE MEASURES'; 152 CARDS; NOTE: The data set WORK.ONE has 33 observations and 4 variables. NOTE: DATA statement used: real time 0.03 seconds cpu time 0.00 seconds 186 ; 187 188 data two; set one; NOTE: There were 33 observations read from the data set WORK.ONE. NOTE: The data set WORK.TWO has 33 observations and 4 variables. NOTE: DATA statement used: real time 0.00 seconds cpu time 0.00 seconds 189 proc print; NOTE: There were 33 observations read from the data set WORK.TWO. NOTE: PROCEDURE PRINT used: real time 0.03 seconds cpu time 0.00 seconds 190 Proc sort; by group; NOTE: There were 33 observations read from the data set WORK.TWO. NOTE: The data set WORK.TWO has 33 observations and 4 variables. NOTE: PROCEDURE SORT used: real time 0.01 seconds cpu time 0.01 seconds 191 proc univariate freq normal plot; var dopa lndopa; 192 title2 'Proc univariate -- combined groups'; 193 %qqplot (data=two, var=dopa); WARNING: Variable _QQREF_ not found in data set WORK._QQ1_. 194 %qqplot (data=two, var=lndopa); WARNING: Variable _QQREF_ not found in data set WORK._QQ1_. NOTE: There were 33 observations read from the data set WORK._QQ1_. NOTE: PROCEDURE PLOT used: real time 0.00 seconds cpu time 0.00 seconds 195 proc univariate data=two freq normal plot; var dopa lndopa; by group; 196 title2 'Proc univariate for dopa and log(dopa)-- stratified by group'; 197 %let group1= where = (group='control'); 198 %qqplot (data=two(&group1) , var=dopa); WARNING: Variable _QQREF_ not found in data set WORK._QQ1_. 199 %qqplot (data=two(&group1) , var=lndopa); WARNING: Variable _QQREF_ not found in data set WORK._QQ1_. 200 %let group2= where = (group='neurblst'); 201 %qqplot (data=two(&group2) , var=dopa); WARNING: Variable _QQREF_ not found in data set WORK._QQ1_. 202 %qqplot (data=two(&group2) , var=lndopa); WARNING: Variable _QQREF_ not found in data set WORK._QQ1_. NOTE: There were 15 observations read from the data set WORK._QQ1_. NOTE: PROCEDURE PLOT used: real time 0.00 seconds cpu time 0.00 seconds 203 data two; set two; NOTE: There were 33 observations read from the data set WORK.TWO. NOTE: The data set WORK.TWO has 33 observations and 4 variables. NOTE: DATA statement used: real time 0.01 seconds cpu time 0.01 seconds 204 proc ttest; class group; var dopa lndopa; 205 title2 'Proc ttest -- for dopa and log(dopa)'; NOTE: There were 33 observations read from the data set WORK.TWO. NOTE: PROCEDURE TTEST used: real time 0.07 seconds cpu time 0.01 seconds 206 proc npar1way wilcoxon; class group; var dopa; 207 title2 'Proc npar1way -- Wilcoxon rank sum test for dopa'; NOTE: There were 33 observations read from the data set WORK.TWO. NOTE: PROCEDURE NPAR1WAY used: real time 0.04 seconds cpu time 0.00 seconds 208 proc rank out=ranks; var dopa; ranks rankdopa; NOTE: The data set WORK.RANKS has 33 observations and 5 variables. NOTE: PROCEDURE RANK used: real time 0.01 seconds cpu time 0.01 seconds 209 proc print data=ranks; var dopa rankdopa; 210 title2 'Proc rank -- Rank transformation of dopa'; NOTE: There were 33 observations read from the data set WORK.RANKS. NOTE: PROCEDURE PRINT used: real time 0.00 seconds cpu time 0.00 seconds 211 proc ttest; class group; var rankdopa; 212 title2 'Proc ttest using rank transformation for dopa'; 213 run; NOTE: There were 33 observations read from the data set WORK.RANKS. NOTE: PROCEDURE TTEST used: real time 0.01 seconds cpu time 0.01 seconds 214 215 DATA PREPOST; 216 TITLE1 'PAIRED PRE-POST DATA'; 217 ** This example is taken from the PROC TTEST chapter of the SAS manual, 218 p. 1638-9. For example, assume that a sample of 15 children suffering 219 from growth failure are treated with a new drug. The growth velocity 220 in mm/yr is measured before treatment (pre) and after treatment (post) 221 in each child. This is a design where each child serves as their own 222 control. Thus these are correlated or paired observations. We wish to 223 assess whether the drug has altered the rate of growth of these children. 224 **; 225 226 227 INPUT PRE POST; 228 DIFF = POST - PRE; 229 ADIFF = ABS(DIFF); 230 SDIFF = SIGN(DIFF); 231 CARDS; NOTE: The data set WORK.PREPOST has 15 observations and 5 variables. NOTE: DATA statement used: real time 0.01 seconds cpu time 0.00 seconds 247 ; 248 PROC UNIVARIATE NORMAL PLOT; VAR DIFF; 249 title2 'PROC UNIVARIATE assessment of normality'; 250 title3 'and with paired t-test, and Wilcoxon signed rank test'; NOTE: PROCEDURE UNIVARIATE used: real time 0.04 seconds cpu time 0.00 seconds 251 PROC MEANS N SUM MEAN STD STDERR T PRT; VAR DIFF; 252 title2 'paired t-test conducted using PROC MEANS'; 253 254 RUN; NOTE: There were 15 observations read from the data set WORK.PREPOST. NOTE: PROCEDURE MEANS used: real time 0.04 seconds cpu time 0.01 seconds 255 256 257 ** QUALTITATIVE DATA -- ASSOCIATION BETWEEN RACE AND CANCER SEVERITY; 258 ** *; 259 ** Carcinoma of the endometrium is the most common *; 260 ** malignant tumor in the female genital tract, comprising about *; 261 ** 13% of all malignant tumors in women. White women have a higher *; 262 ** incidence rate of endometrial cancer compared to black women, but *; 263 ** black women have a higher mortality rate due to endometrial *; 264 ** cancer compared to white women. Past investigations have sug- *; 265 ** gested that a possible explanation for the racial difference in *; 266 ** survival was a more extensive disease at diagnosis among black *; 267 ** women. A researcher was interested in the relationship between *; 268 ** race (black versus white) and histologic grade of the tumor at *; 269 ** diagnosis. *; 270 ** *; 271 ** A total of 733 black or white female residents of metropolitan *; 272 ** Atlanta with a diagnosis of endometrial cancer between 1978 and *; 273 ** 1982 was obtained from the tumor registry of the Atlanta Cancer *; 274 ** Surveillance Center. Eighty-three percent (611/733) of these *; 275 ** women had histologic grading done at the time of diagnosis. *; 276 ** The resulting frequencies were: *; 277 ** *; 278 ** RACE *; 279 ** Histologic grade: White Black *; 280 ** I = highly differentiated tumor 240 18 *; 281 ** II = moderately differentiated tumor 173 36 *; 282 ** III = undifferentiated tumor 112 32 *; 283 ** *; 284 DATA ONE; INPUT grade j freqncy; 285 TITLE1 'ASSOCIATION BETWEEN RACE AND CANCER SEVERITY'; 286 if j = 1 then race='white'; 287 if j = 2 then race='black'; 288 CARDS; NOTE: The data set WORK.ONE has 6 observations and 4 variables. NOTE: DATA statement used: real time 0.00 seconds cpu time 0.00 seconds 295 ; 296 297 PROC FREQ; TABLES grade*race / CHISQ expected measures; 298 WEIGHT freqncy; 299 300 RUN; NOTE: There were 6 observations read from the data set WORK.ONE. NOTE: PROCEDURE FREQ used: real time 0.10 seconds cpu time 0.01 seconds