Hi Everyone,
I was trying to plot a p-chart using PROC SHEWHART on SAS 9.4.
I wanted to show a positive shift in my process centerline to 100%. However, SAS shows me the following error:
WARNING: No variability was encountered in the data for process variable Completion.
Is there any suggestion on how should I show a 100% centerline?
It would help if you showed your SAS code and a portion of your data.
Also: could you please explain how a p-chart can have a centerline at 100%? A p-chart has percent or proportion on the vertical axis, it goes from 0% to 100%, so it doesn't make sense to me to have the centerline at 100%.
Week Beginning | Num | Den | Completion % |
20/01/2019 | 8 | 8 | 100 |
27/01/2019 | 8 | 8 | 100 |
03/02/2019 | 20 | 20 | 100 |
10/02/2019 | 8 | 11 | 72.72727 |
17/02/2019 | 11 | 13 | 84.61538 |
24/02/2019 | 8 | 9 | 88.88889 |
03/03/2019 | 16 | 28 | 57.14286 |
10/03/2019 | 3 | 4 | 75 |
17/03/2019 | 19 | 20 | 95 |
24/03/2019 | 15 | 20 | 75 |
31/03/2019 | 4 | 4 | 100 |
07/04/2019 | 2 | 2 | 100 |
14/04/2019 | 5 | 5 | 100 |
21/04/2019 | 2 | 2 | 100 |
28/04/2019 | 5 | 5 | 100 |
05/05/2019 | 1 | 1 | 100 |
12/05/2019 | 6 | 6 | 100 |
19/05/2019 | 1 | 1 | 100 |
26/05/2019 | 2 | 3 | 66.66667 |
02/06/2019 | 2 | 3 | 66.66667 |
09/06/2019 | 4 | 4 | 100 |
16/06/2019 | 3 | 3 | 100 |
23/06/2019 | 4 | 4 | 100 |
My baseline was calculated using the 1st 8 points (~81%) and then a new centerline for 100% was calculated from the week 03/31/2019-05/19/2019 (using the 8 points above the centerline rule). However, SAS code is showing me error for not being able to calculate control limits when the centerline becomes 100%. I have tried to create 2 "Phases" in my program to calculate the 2 centerlines as shown below:
proc sort data=V; by _PHASE_;run;
proc shewhart data=V;
by _PHASE_;
pchart Completion*Week_Beginning/subgroupn=Den dataunit=percent
outlimits = LimV(rename=(_PHASE_=_INDEX_)) interval=day discrete
nochart;
run;
proc shewhart data=V limits=LimV;
pchart Completion*Week_Beginning/
markers discrete
subgroupn=Den
totpanels=1
dataunit=percent
nolegend
cout=red
height=6
odstitle=none
yscale=percent
readindexes= all
readphases=all
readlimits;
label Completion="Weekly Proportion %"
Week_Beginning="Week Beginning";
run;
The error message is correct. Control limits cannot be calculated when the mean value is 100%. There is no variability from which you can compute upper or lower control limits.
I understand. But is there a way to have control limits for the 1st Phase in which my centerline is not 100% and then have no limits when the centerline becomes 100%?
Well, to be honest, I have never tried. So I cannot answer further.
No problem. Thank you for your help anyway.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.