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
- /
- SAS Programming
- /
- SAS Procedures
- /
- Proc Shewhart: Reading Limits data into the INSET...

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
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-15-2016 02:11 PM - edited 06-15-2016 02:12 PM

Hello,

I am having an issue with my proc shewhart INSET values for CPK, CPKLCL, and CPKUCL. What I am doing is I have a set of data, for example n=60, and with this data I need to split the chart where a shift in the process/mean takes place. Such as there was a shift after data point 29, and starting with data point 30 I would want to calculated new control limits and capability estimates. I have no problems showing the shifts in the charts and calculating the new control limits for each range of data using the _PHASE_ and _INDEX_ options. Control limit and mean wise, everything looks great in the chart and aligns with the stats data set corresponding to the correct range of data. However, the Capability estimates, which I want based just on the last phase of data, are not matching to the limits. The current code I have has been provided below to help clear up the picture. The data is simple height versus observation number.

data physical;

set physical;

length _PHASE_ $2.;

if obs < 25 then _PHASE_ = 'A';

if obs >= 25 then _PHASE_ = 'B';

run;

(Phases created to determine with range of data gets which set of limits)

proc shewhart data=physical;

where obs < 25;

irchart Height*obs='*' / nochart2 totpanels=1 ciindices lsl=60 usl=80 outlimits=stats2;

inset stddev cpklcl='Cpk 95% Lower' cpk='Cpk' cpkucl='Cpk 95% Upper' / pos=nw format=6.2;

run;

(Creating the Stats2 data set to contain the limits for datapoints 1 through 24, or _PHASE_ 'A')

data stats2;

set stats2;

length _INDEX_ $2.;

_INDEX_ = 'A';

run;

(adding the _INDEX_ variable to match the limits dataset with the range of data that contains the corresponding _PHASE_ 'A')

proc shewhart data=physical;

where obs >= 25;

irchart Height*obs='*' / nochart2 totpanels=1 ciindices lsl=60 usl=80 outlimits=stats3;

inset stddev cpklcl='Cpk 95% Lower' cpk='Cpk' cpkucl='Cpk 95% Upper' / pos=nw format=6.2;

run;

(Creating the Stats3 data set to contain the limits for datapoints 25 through last data point, or _PHASE_ 'B')

data stats3;

set stats3;

length _INDEX_ $2.;

_INDEX_ = 'B';

run;

(adding the _INDEX_ variable to match the limits dataset with the range of data that contains the corresponding _PHASE_ 'B')

data stats;

set stats2 stats3;

run;

(stacking data sets stats2 and stats3 into one data set to be read into proc shewhart)

proc shewhart data=physical limits=stats;

irchart Height*obs='*' / nochart2 totpanels=1 ciindices lsl=60 usl=80 readindexes=all phaselegend;

inset stddev cpklcl='Cpk 95% Lower' cpk='Cpk' cpkucl='Cpk 95% Upper' / pos=nw format=6.2;

run;

(Here is the proc shewhart procedure in which I have the phases with their respective limits; however, the capability indices are not from stats3 - Which leads me to my question of how do I get the INSET statement to read the data directly from the stats for _PHASE_ B)

If I just run proc shewhart with obs >= 25, i get the correct capability information, but in the above procedure, it does not give me these sames estimates.

Any help is greatly appreciated.

Thank you,

Jeff S. O.

Accepted Solutions

Solution

06-16-2016
08:42 AM

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

Posted in reply to Jolly

06-15-2016 04:35 PM

All Replies

Solution

06-16-2016
08:42 AM

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

Posted in reply to Jolly

06-15-2016 04:35 PM