Thank you, Bucky. This is very helpful and opened up a lot of new info for me. One follow up I have is that this method doesn’t seem to work for p charts or X-bar S charts. I assume that’s because those are driven off the record level values rather than those summarized by group. But not sure. I’m pasting example below. Is there an alternative that will work for p and X-bar S charts? Or maybe I’m mistaken and I can get pointed in the right direction.
proc sql; create table work.month4vp1 (_year_month char(7), defects num(8),population num(8),percentage num(8));
insert into work.month4vp1 values('2013-10',87,115,75.65) values('2013-11',59,97,60.82) values('2013-12',56,102,54.9) values('2014-01',15,39,38.46) values('2014-02',24,40,60) values('2014-03',34,62,54.84) values('2014-04',41,72,56.94) values('2014-05',55,76,72.37) values('2014-06',21,35,60) values('2014-07',29,52,55.77) values('2014-08',75,123,60.98) values('2014-09',144,288,50) values('2014-10',76,129,58.91) values('2014-11',38,83,45.78) values('2014-12',46,70,65.71) values('2015-01',36,50,72) values('2015-02',31,53,58.49) values('2015-03',51,83,61.45) values('2015-04',32,70,45.71) values('2015-05',77,117,65.81); quit;
***run it first without ghosting the 2013-10 group;
;proc shewhart data=month4vp1 ; pchart defects*_YEAR_MONTH / subgroupn = population totpanels=1 DISCRETE skiphlabels=1 markers yscale=percent tests=1 to 4 testnmethod=standardize CTEXT=BLACK CTESTS = (1 BLACK 2 blue 3 ORANGE 4 GREY) test2run=8 TESTLABEL1="*" TESTLABEL2="8 pts on 1 side" TESTLABEL3="6 point trend" TESTLABEL4="alternating pattern" ; RUN;
*now ghost out using _exlim_ and _comp_; ******************************; proc shewhart data=month4vp1 ; pchart defects*_YEAR_MONTH / subgroupn = population nochart outhistory=hist4 outtable=tab4 ; run;
data tab4; set tab4; if _EXLIM_ ne '' then _COMP_='N'; else _COMP_='Y'; keep group _COMP_; run;
data history4; merge hist4 tab4; run;
;proc shewhart data=month4vp1 history=history4; pchart defects*_YEAR_MONTH / subgroupn = population totpanels=1 DISCRETE skiphlabels=1 markers yscale=percent tests=1 to 4 testnmethod=standardize CTEXT=BLACK CTESTS = (1 BLACK 2 blue 3 ORANGE 4 GREY) test2run=8 TESTLABEL1="*" TESTLABEL2="8 pts on 1 side" TESTLABEL3="6 point trend" TESTLABEL4="alternating pattern" ; RUN;
... View more