Hello, I used the following code to create an XS chart, as shown in the attached file. The plot currently displays the mean values, how to display the value of S_bar on the SD plot as well?
proc shewhart data=Master_pre_H_Q ; xschart LOS_hours*AdmitYYQ /Markers outtable=outtable ODSTITLE="Mean-SD Chart of LOS Pre-Intvn" nolegend turnhlabels nohlabel ; label LOS_hours = 'Mean LOS (Hours)'; run;proc print;run;
Thanks
From the SAS/QC 15.2 documentation, it appears that you need to add SSYMBOL=SBAR as an option to the XSCHART statement (although SSYMBOL=SBAR is called out as the default). If the central line is not constant, only the symbol is displayed. That sort of looks like what you currently have being printed, but your central line looks constant so that shouldn't be an issue.
Subgroups? The Turbines example in the PROC SHEWART documentation looks to me like the subgroup is equal to the full sample size (n=20). If you have multiple subgroups then maybe that is the source of why the 'value' part of the Sbar isn't getting printed.
SteveDenham
Thank you for your answer. The subgroup is different, but the thing is, with different subgroup sizes, I can see the values of x_bar in the x chart and can not see the value of s_bar in the s chart even when I plot only the S-chart
proc shewhart data=Master_pre_H_Q ;
schart LOS_hours*AdmitYYQ /Markers outtable=outtable ODSTITLE="SD Chart of LOS"
nolegend turnhlabels nohlabel SSYMBOL=SBAR;
run;
The central line in the s chart varies when the subgroup sizes vary, so it's not labeled. See Constructing Charts for Standard Deviations.
Thanks for your answer, yes, central line varies with different subgroup sizes, but in the plot central line is constant as this is S_bar (the mean of those different s_i) , so I want to take the mean of those different s_i and labelled on the plot as a S_bar like the below article:
for instance I created the S_chart using the belo code, how to get the mean of those different s_i and labeled on the plot ?
proc shewhart data=tmp1;
schart LOS*AdmitYYQ/Markers outlimits=limits ODSTITLE="S Chart of LOS "
turnhlabels nolegend nohlabel ;
label LOS = 'Std Dev of LOS (hours)';
run;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.