Chapter Contents |
Previous |
Next |
Analyzing the Sample Path |
data subset; set sample; if id=5; keep timenow number time; label number="Queue Length"; time = ( timenow - lag(timenow) ); number = lag(state); run;
The resulting data set has three variables: TIMENOW for the time that the state changes; NUMBER for the number in the queue; and TIME for the length of time in that state. The following SAS code executes the UNIVARIATE procedure to produce summary statistics and the GCHART procedure to produce a histogram as shown in Figure 8.5.
proc univariate data=subset; weight time; var number; run; proc gchart; label = "Time in Queue"; vbar number / subvar=time discrete; run;
A similar SAS program subsets the data on server utilization and produces the output in Figure 8.10 and Figure 8.9.
data subset; set sample; if id=4; keep timenow number time; label number="Utilization"; time = ( timenow - lag(timenow) ); number = lag(state); run; proc univariate data=subset; weight time; var busy; run; proc gchart; pie busy / sumvar=time discrete percent=outside; run;
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.