I use two test-related statements, and the control chart is out of control.
Why don't the red words and red lines appear?
How do I adjust the grammar?
thank you for your response
.
data a;
input sequ n subgroup y m;
datalines;
1 227 1650 2018 1
2 178 1522 2018 2
3 184 1563 2018 3
4 180 1523 2018 4
5 179 1653 2018 5
6 186 1520 2018 6
7 195 1596 2018 7
8 157 1588 2018 8
9 165 1592 2018 9
10 200 1561 2018 10
11 89 1554 2018 11
12 110 1646 2018 12
13 120 1662 2019 1
14 119 1581 2019 2
15 183 1676 2019 3
16 161 1607 2019 4
17 196 1769 2019 5
18 140 1651 2019 6
19 293 1723 2019 7
20 211 1747 2019 8
21 207 1670 2019 9
22 164 1658 2019 10
23 100 1644 2019 11
24 121 1664 2019 12
;run;
ods graphics on / width=1600 height=600 ;
title "notitle_p chart";
proc shewhart data=a;
pchart n*sequ (y m) /
subgroupn = subgroup
odstitle=title
tests=1 2 3 5
test2run=8
alln
haxis=1 to 25 by 1
yscale=percent
markers
nohlabel
nochart2
blockpos=3
blocklabelpos=left
rtmplot=histogram
ltmplot=schematic
rtmargin=10
ltmargin=4
zonelabels;
Label n="I am n" y="year" m="month";
run;title; ods graphics off;
The problem has been solved.
Just add testnmethod = standardize to the options after the pchart statement
PROC SHEWHART is a little weird compared to the more modern graphical procedures. Please try it with
ODS GRAPHICS OFF;
instead of with
ODS GRAPHICS ON;
If I turn off ods graphics, I will not be able to output large images. Or is there another way to overcome it?
Because I can't increase the size of text and numbers, I can only use ods graphics to output them as .tiff files, and then convert them to JPG files through LIGHTROOM. This text size is acceptable in this method.
If I setup ods graphics off, how do I set the width and height of the graphics and increase the size of the text and numbers, then please provide a method, thank you.
When I setup ODS GRAPHICS on the irchart statement (individual chart), the data points that exceed the control limits can be displayed in red. However, I can't succeed on the pchart.
If I turn off ods graphics, I will not be able to output large images. Or is there another way to overcome it?
I don't think this is true. Please give it a try.
The problem has been solved.
Just add testnmethod = standardize to the options after the pchart statement
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.