turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How do I create control limits that do not vary wi...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-24-2012 11:59 AM

Hi,

I am creating control charts using Proc Shewart. I created a data set containing limits.

When these limits are being applied to my data, they vary because the sample size varies. I would like my limits to not vary according to sample size, just to take the Process mean and the standard deviation specified in the limits table to create the limits. Stability in the limits will make it easier for our operators to interpret.

I think there should be an easy way to do this, but I don't know what it is!

Thank you!

Kim

Accepted Solutions

Solution

05-25-2012
11:16 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Kimberley

05-25-2012 11:16 AM

Hi Kimberley,

Could you post a code snippet of what you're trying to do? There are many different charts which can be produced by proc shewhart, and they have different default behavior for control limits based upon the underlying statistical assumptions. I see the "xsxhart" tag- is that really the "xschart" statement?

In the SAS/QC user's guide, there are a couple examples in the "xschart" section showing control charts with fixed limits.

title 'Mean and Standard Deviation Charts for Power Output';

proc shewhart data=Turbine;

xschart KWatts*Day ;

run;

If you wish to set your own limits, such as when you have limits created on an initial set of data, and wish to apply them to a new set of data, the the answer is to use the "LIMITS=" option to the PROC SHEWHART statement

This option will read in a dataset produced by a previous run of the procedure. Here is an example for a p-chart:

First, generate the dataset with the limits you want using the OUTLIMITS dataset.

This example uses the pchart statement, but it should be almost identical for the xschart statement if that's what you're using.

title 'Proportion of Circuit Failures';

proc shewhart data=CircOne;

pchart Fail*Batch / subgroupn = 500

outindex = 'Trial Limits'

outlimits = Faillim1

odstitle = title;

run;

Then read that data set, "Faillim1", in when running PROC SHEWHART the next time. (see the documentation for a more complicated version)

title 'p Chart with Revised Limits for Failed Circuits';

proc shewhart data=CircOne limits=Faillims1;

pchart Fail*Batch / subgroupn = 500

readindex = 'Revised Limits'

vref = 0.0156 0.032226

vreflabels = ('Trial P' 'Trial UCL')

vreflabpos = 3

odstitle = title

nolegend;

label Fail = 'Fraction Failed'

Batch = 'Batch Index';

run;

ods graphics off;

Let me know if this helps, but it sounds like you might have figured it out. Please post any code if you have any specific issues you'd like help with.

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Kimberley

05-24-2012 01:23 PM

I found my own answer I think. I am using the LIMITN=n option, which I will set for my average sample size, unless someone has a better idea! feedback appreciated, Thanks!

Solution

05-25-2012
11:16 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Kimberley

05-25-2012 11:16 AM

Hi Kimberley,

Could you post a code snippet of what you're trying to do? There are many different charts which can be produced by proc shewhart, and they have different default behavior for control limits based upon the underlying statistical assumptions. I see the "xsxhart" tag- is that really the "xschart" statement?

In the SAS/QC user's guide, there are a couple examples in the "xschart" section showing control charts with fixed limits.

title 'Mean and Standard Deviation Charts for Power Output';

proc shewhart data=Turbine;

xschart KWatts*Day ;

run;

If you wish to set your own limits, such as when you have limits created on an initial set of data, and wish to apply them to a new set of data, the the answer is to use the "LIMITS=" option to the PROC SHEWHART statement

This option will read in a dataset produced by a previous run of the procedure. Here is an example for a p-chart:

First, generate the dataset with the limits you want using the OUTLIMITS dataset.

This example uses the pchart statement, but it should be almost identical for the xschart statement if that's what you're using.

title 'Proportion of Circuit Failures';

proc shewhart data=CircOne;

pchart Fail*Batch / subgroupn = 500

outindex = 'Trial Limits'

outlimits = Faillim1

odstitle = title;

run;

Then read that data set, "Faillim1", in when running PROC SHEWHART the next time. (see the documentation for a more complicated version)

title 'p Chart with Revised Limits for Failed Circuits';

proc shewhart data=CircOne limits=Faillims1;

pchart Fail*Batch / subgroupn = 500

readindex = 'Revised Limits'

vref = 0.0156 0.032226

vreflabels = ('Trial P' 'Trial UCL')

vreflabpos = 3

odstitle = title

nolegend;

label Fail = 'Fraction Failed'

Batch = 'Batch Index';

run;

ods graphics off;

Let me know if this helps, but it sounds like you might have figured it out. Please post any code if you have any specific issues you'd like help with.