SAS OnlineTutorback||next

Try It! Specify a computed variable in a report of Clinic.Diabetes.

Creating HTML output? Read this first.

  1. Copy and paste the following program into the Program Editor window:
     proc report data=clinic.diabetes nowd;
        column sex weight fastgluc postgluc;
        where age>40;
        define weight / format=comma6.2
                        spacing=4 width=7;
        define sex / order width=7
                     spacing=4 center
                     'Sex of/Patient';
        define fastgluc / 'Fasting/Glucose';
        define postgluc / 'Postprandial/Glucose'
                          width=12;
     run;       
  1. Modify the program to specify and define the computed variable GlucRange. Assign the column heading Glucose Range to the new variable, using a split character so that the column heading appears on two lines. Calculate values of GlucRange as the difference between the sum of PostGluc and the sum of FastGluc (PostGluc contains larger values).

  2. Submit the program and view the report.

    Return here and select Next.

Solution
back||next


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

Terms of Use & Legal Information | Privacy Statement