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
- /
- Understanding test output for an IRChart is Proc S...

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

10-24-2016 10:04 AM

I'm trying to use Ir cahrt to evaluate what observations to keep in a data reduction exercise. This seems to work well. I want to validate my understanding of the procedure.

This create example data:

```
data for_shewart;
do i=1 to 25 by 1;
num=ranuni(12345)*10;
output;
end;
/*just to make certain that I have a record exceeding 3 sigma limit*/
i=26; num=25; output;
do i=27 to 30 by 1;
num=ranuni(54321)*10;
output;
end;
/*just to make certain that I have 7 in a row going up*/
do i=31 to 37 by 1;
num=i-30;
output;
end;
/*and just to make certain the I have 7 in a row going down*/
do i=38 to 44 by 1;
num=10-(i-39);
output;
end;
/*And some Noise again*/
do i=45 to 55 by 1;
num=ranuni(34512)*10;
output;
end;
run;
```

This does the analyses (cut and pasted from EG

```
OPTIONS DEV=PNG;
SYMBOL VALUE=PLUS;
/* -------------------------------------------------------------------
Sort data set SASApp:WORK.FOR_SHEWART
------------------------------------------------------------------- */
PROC SQL;
CREATE VIEW WORK.SORTTempTableSorted AS
SELECT T.num, T.i
FROM WORK.FOR_SHEWART as T
;
QUIT;
TITLE;
TITLE1 "Shewhart analysis of: num*i";
FOOTNOTE;
FOOTNOTE1 "Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
PROC SHEWHART DATA = WORK.SORTTempTableSorted
;
IRCHART (num) * i /
TESTS= 1 3
CTESTS=RED
TESTOVERLAP
TESTLABEL1='O'
TESTLABEL3='t'
OUTTABLE=WORK.SHEWSubgrpStatsAndCtlLmts(LABEL="Control Chart subgroup statistics and control limits for WORK.FOR_SHEWART")
SIGMAS=3
CAXIS=BLACK
WAXIS=1
CTEXT=BLACK
CINFILL=CXA9A9A9
CLIMITS=BLACK
TOTPANELS=1
CCONNECT=BLUE
COUTFILL=RED
CFRAME=CXD3D3D3
LIMITN=2
;
;
/* -------------------------------------------------------------------
End of task code
------------------------------------------------------------------- */
RUN; QUIT;
```

I have specified test 1 (Outside control limits) and test 3 at least 6 in row ascending or descending..

The table output around the tests look like this.

The output for the outside control limits is obvious.

For the type 3 test can sombody please confirm that the test is always marked at the last point in the trend meaning that in my example I can be certain that the dowward trend always will start 6 observations before point 43. Analysing various outputs seem to hold true.

The follow-up question is the best way to find the strat of a trend. I now I can use expand on the whole output and take a lag 6 and keep the subgroup identifier and the value at that point and from this get the start point, and compare the current value with the lag 6 value to determine if this is an upward or downward trend. I was hoping for a less laboursome solution as my data are rather big.

Thanks Pål N