Programming the statistical procedures from SAS

How do I create control limits that do not vary with the sample size?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

How do I create control limits that do not vary with the sample size?

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
SAS Employee
Posts: 5

Re: How do I create control limits that do not vary with the sample size?

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

http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a000000...

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

http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a000000...

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.

View solution in original post


All Replies
Occasional Contributor
Posts: 12

Re: How do I create control limits that do not vary with the sample size?

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
SAS Employee
Posts: 5

Re: How do I create control limits that do not vary with the sample size?

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

http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a000000...

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

http://support.sas.com/documentation/cdl/en/qcug/63964/HTML/default/viewer.htm#qcug_shewhart_a000000...

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.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 200 views
  • 3 likes
  • 2 in conversation