options nodate nonumber ps=55 ls=80; title 'RPD -- Chapter 5 -- Linthurst Data: Spartina Biomass'; data linthurst (drop=obsnum); /* don't include obsnum in the data set */ infile 'linthurst.dat'; /* file must be in the active directory */ input obsnum loc $ type $ biomass salinity pH K Na Zn; run; /* Sec. 5.1 */ proc print; run; /* Sec. 5.2 */ proc reg corr; /* option "corr" prints correlation matrix */ model biomass = salinity pH K Na Zn / ss2; run; /* Sec. 5.3 */ delete Na; /* remove "Na" from model statement */ print; /* refit the model and display new results */ run; delete Zn; print; run; delete salinity; print; run; /* Sec. 5.4 */ plot biomass*predicted.; /* plot Y versus Yhat */ run; print covb; /* print est. var.-covar. matrix of LS ests. */ run; /* Submit a new model statement to request CIs and PIs: */ model biomass = pH K / clb clm cli; run; /* PROC REG cannot make simultaneous inferences. Instead change the alpha value manually to get Bonferroni CIs for parameters ... */ proc reg alpha=0.0166667; model biomass = pH K / clb; run;