BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
bhr-q
Obsidian | Level 7

Hello, I want to create just Xbar chart for LOS(hours) quartely with 8 subgroups using SAS.,

I used  XSCHART , it will give me both both X-bar and S charts together. Same for XR chart.

but I only want to have  X-bar chart.

I also cannot use only xchart in my SAS code as xchart  is used for individual data not for subgroup data.

How can I adjust my SAS code to see only the X-bar chart in my output? 

 

proc shewhart data=MIS;
xSchart LOS*AdmitYYQ / Markers     outtable=outtable   ;
run;

 

Attached is the output to see both are in the same frame.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
7 REPLIES 7
PaigeMiller
Diamond | Level 26

Use the NOCHART2 option

--
Paige Miller
Zard
SAS Employee

You can use the NOCHART2 option in the XSCHART or the XRCHART statement to suppress the secondary chart.

 

proc shewhart data=MIS;
xSchart LOS*AdmitYYQ / Markers     outtable=outtable   nochart2;
run;

Quentin
Super User

@bhr-q wrote:

I also cannot use only xchart in my SAS code as xchart  is used for individual data not for subgroup data.

How can I adjust my SAS code to see only the X-bar chart in my output? 

nochart2 is a fine solution.  You could also use XCHART.  XCHART in PROC SHEWHART  is for subgroup means, the individual data chart is called an IRCHART.  

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
bhr-q
Obsidian | Level 7
Thank you for the response, I actually tried Xchart, but doesn't work for the subgroup sample size greater than 25. so, I need to use nochart2.
Quentin
Super User

@bhr-q wrote:
Thank you for the response, I actually tried Xchart, but doesn't work for the subgroup sample size greater than 25. so, I need to use nochart2.

If you use Xchart, by default it uses the subgroup range to estimate the process SD, with sample size greater than 25 you get an error, but it comes with a helpful suggestion:

ERROR: A subgroup sample size greater than 25 was encountered for process variable x.
NOTE: Suggested alternatives are to subdivide the subgroups, or to base the control limits on subgroup standard deviations rather
      than subgroup ranges.
NOTE: Use the STDDEVS option in an XCHART or MCHART statement to specify estimation of the process standard deviation from
      subgroup standard deviations rather than subgroup ranges.

So if you add the STDDEVS option, the XCHART will use subgroup SD to estimate the process SD, which is what an XSCHART does by default.


In my understanding, 

xchart y*lot /stddevs ;

is equivalent to:

xschart y*lot /nochart2 ;

So, just two different ways to do the same thing (as often is available in SAS).

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
bhr-q
Obsidian | Level 7
Thank you so much for letting me know, I did just now, and it works. Great way to know.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 7 replies
  • 757 views
  • 4 likes
  • 4 in conversation