Statistical Analysis for Education and Psychology Researchers

(Jeff_L) #1

horizontal bar chart for the variable subject of study. These bar charts were produced by
the following SAS code:


proc chart;
vbarnumv/discrete; /*Vertical bar chart*/
title 'Frequency of number of A levels for 1st class
honours graduates'
run;
proc chart;
hbar sub/discrete; /*horizontal bar chart*/
title 'Frequency of 1st class honours graduates by
subject of study'; run;

The discrete option is used after the vbar/hbar statements to tell SAS to produce a bar
chart with a bar for each value (category) of the specified variable. Whenever a
categorical variable with numeric values (nominal/ordinal) or a quantitative discrete
variable (count) is used the discrete option is useful.


Statistical analysis for education and psychology researchers 52
Free download pdf