Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The REG Procedure

Example 55.4: Displaying Plots for Simple Linear Regression

This example introduces the basic PROC REG graphics syntax used to produce a standard plot of data from the aerobic fitness data set (Example 55.1). A simple linear regression of Oxygen on RunTime is performed, and a plot of Oxygen*RunTime is requested. The fitted model, the regression line, and the four default statistics are also displayed in Output 55.4.1.

   data fitness;
      set fitness;
      label Age      ='age(years)'
            Weight   ='weight(kg)'
            Oxygen   ='oxygen uptake(ml/kg/min)'
            RunTime  ='1.5 mile time(min)'
            RestPulse='rest pulse'
            RunPulse ='running pulse'
            MaxPulse ='maximum running pulse';
   proc reg data=fitness;
      model Oxygen=RunTime;
      plot Oxygen*RunTime / cframe=ligr;
   run;

Output 55.4.1: Simple Linear Regression
regx1g.gif (4475 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.