Appendix F. 
SAS Computer Code for James River Chlorophyll a 
Normality Tests, Spring and Summer Season 
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ 
* PROGRAM: JAMES_RIVER.sas 
* This program will TEST CHLOROPHYLL DATA FOR NORMALITY 
* Base code from Elgin Perry 02/16/2010 
* additional code written by Jackie Johnson 02/17/2010 
/ 
libname ALGAE "G:\LR\OTHER_LR_DATA\Criteria_work\chlorophyll\2010"; 
*libname ALGAE "C:\Projects\CBP\CHLCRIT\LogNormal\"; 
options 1s = 7 2; 
*OPTIONS LS=120 PS=55 REPLACE NOCENTER; 
OPTIONS formchar = '|-|+|-+=|-/\<>*' ; 
* PROC IMPORT OUT= ALGAE.JAMES_SPRING_CHL 
DATATABLE= "JAMES_SPRING_CHL" 
DBMS=ACCESS2000 REPLACE; 
* 
DATABASE="G:\LR\OTHER_LR_DATA\Criteria_work\chlorophyll\2010\j ames_river.mdb" 
/ 
*RUN; 
* PROC CONTENTS DATA=ALGAE.JAMES SPRING CHL;RUN; 
data one; 
set ALGAE.JAMES_SPRING_CHL; 
logE_Chl = log(reported_value) ; 
label 
. logE Chl=" 
LOG_E UG/LITER" 
/ 
if 
cbseg 2003 
= 
"APPTF" 
or 
cbseg 2003 
= 
"CHKOH" 
or 
cbseg 2003 
= 
"EBEMH" 
or 
cbseg 2003 
= 
"LAFMH" 
or 
cbseg 2003 
= 
"WBEMH" 
then 
delete; 
if 
cbseg 2003 
= 
"JMSPH" 
then 
SegGrp = 1; 
if 
cbseg 2003 
= 
"JMSMH" 
or 
cbseg 2003 
= 
"SBEMH" 
then 
SegGrp = 2; 
if 
cbseg 2003 
= 
"JMSOH" 
or 
cbseg 2003 
- 
"CB8PH" 
or 
cbseg 2003 
= 
"ELIPH" 
then 
SegGrp = 3; 
if 
cbseg 2003 
= 
"JMSTF" 
then 
SegGrp = 4; 
sdate = DatePart(SAMPLE_DATE); 
year = year(SDATE); 
RUN; 
*Proc Contents; 
run ; 
title "Spring James River Data 1991-2000"; 
proc glm data=one; 
class year cbseg_2003; 
model logE_Chl=year cbseg_2003; 
output out= reschl r=rchl; 
run ; 
proc Univariate normal plot data=work.reschl; 
title2 "Normality test on raw residuals"; 
57 
