BookmarkSubscribeRSS Feed
Jweinstein2001
Calcite | Level 5

I have a dataset coded into sas. I have separated my dataset to only include points within the first phase. I am now wondering how to structure the xchart statement. It asks for xchart then process*subgroup. Attached are pictures of my table of data points and I was wondering how to code these data points into an xchart. As you can see I have 44 rows and 20 subgroup variables.

17 REPLIES 17
PaigeMiller
Diamond | Level 26

Some of us are not able to download attachments. Also, data should be provided as text via SAS data step code. We can't work from data in a PDF file.

 

Have you checked the documentation and examples for the XCHART in PROC SHEWHART? 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/qcug/qcug_shewhart_sect329.htm

--
Paige Miller
Jweinstein2001
Calcite | Level 5

The data itself isnt important just included to show you the basic data I was working with. I have looked at the example thank you, but when I try using it is a raw dataset something is wrong so I was trying to leave it as the imported file from excel. 

PaigeMiller
Diamond | Level 26

I can't see the data. I cannot download attachments. Provide the data (or a portion of it) as text in SAS data step code.

 

... but when I try using it is a raw dataset something is wrong ...

 

Show us the code you tried.

--
Paige Miller
Jweinstein2001
Calcite | Level 5

libname St435 "/home/u59307513/sasuser.v94/HW1";
run;
data Partgaps;
input Sample @;
do i=1 to 20;
input Partgap @;
output;
end;
drop i;
label Partgap='Gap Width'
Sample ='Sample Index';
datalines;
1 16.552507972 17.909115563 13.063445109 15.954226937 20.190033047 16.725255782 12.529812549 19.343806673 12.442905304 22.481474005 14.054923923 14.675644834 24.560643783 16.346281409 14.564808634 17.203397870 15.742546621 18.057810221 17.228420339 9.5009465734
2 12.003759282 18.746372138 19.950312219 18.329516735 11.847248334 15.093876863 13.305926566 16.655808722 15.272678474 14.490908430 14.776314990 22.961650718 11.044657946 11.439616363 18.137324272 15.750120792 17.095177506 20.440669626 23.791043835 15.327832083
3 16.798420302 8.6895624505 10.161481921 11.403752788 17.523208969 18.166284440 14.631320346 13.460055157 18.416134284 14.186872076 17.163126140 19.824213121 19.602688117 12.487503051 14.208393961 3.6909357464 11.431802261 17.614577244 17.450022707 18.700473321
4 13.533860076 11.469792782 20.679037220 14.539326563 16.500126652 14.795410621 16.310356605 18.173219419 15.344552266 16.522570351 14.441511325 18.769357863 13.975873252 15.950369066 17.269808842 19.146503724 12.052150676 14.414170730 13.390943347 19.037639141
5 17.630349828 13.912993737 13.466373319 10.253800455 18.102254935 17.675461479 13.980728885 7.4008076987 17.938412190 15.684527061 17.680795552 20.758955216 12.114452609 11.384815288 18.500470709 9.2921479716 19.109715013 15.331435607 16.372915121 23.342298415
6 13.005739687 14.499315289 23.210352949 13.677897441 11.388989072 15.731224042 8.1469985203 15.215786531 17.569802588 23.180653050 19.863002252 20.075392922 17.881506853 18.484968277 15.852549957 10.901464292 15.625064968 22.086605042 14.140507722 19.217624696
7 16.470447489 17.644399709 16.406880536 15.261324267 13.330126038 12.680973240 18.550458793 14.034649805 13.657021662 13.722469230 16.284469579 13.500398225 13.037257011 11.199447592 17.998403999 12.626846113 14.225485832 19.021266504 13.511513397 11.479418532
8 16.989363923 17.983773314 12.497616971 16.204449944 20.539536327 8.7989772616 13.894190706 17.444453550 23.551303707 14.384926795 12.042953105 13.392424909 18.067199652 12.185303551 14.843781382 11.629651095 9.5386283344 23.454279824 22.692610372 18.840896504
9 17.862632433 17.903401629 20.530375937 19.308924971 17.889749719 13.430698479 12.321661403 8.6059005190 14.008485691 17.937604500 19.561624897 15.838869657 12.953894879 13.652150956 19.095705054 9.4137022902 23.088840575 10.109651367 17.179390002 10.134646340
10 16.760704787 11.512040440 19.817959314 20.441536001 14.967372196 16.711637443 18.068841152 8.3388250531 8.5771534021 18.553885351 10.643817415 12.094815299 13.294219463 24.372291629 20.561518755 13.417662326 20.504675442 16.091583645 11.946055113 15.967449618
11 13.001265118 25.875829559 17.765583162 13.364240935 14.788876882 15.330155597 14.522206116 24.482126702 15.487700875 21.566110337 18.345296960 16.756483151 13.178673524 17.096377289 15.537385519 27.254763989 14.807065031 16.885954076 15.419071401 18.364875527
12 18.644105897 14.811246699 17.449301534 18.143983566 5.0184978110 9.6875460692 14.054837076 19.569938245 23.579573584 8.7018833550 17.732221996 20.384972500 18.614963573 15.000140612 17.783483820 14.737248705 13.859936091 11.649931330 15.610768465 12.025510751
13 19.864702903 16.423461425 17.185255323 15.845125965 14.690935362 18.713124861 21.079321930 14.009313776 17.663104605 12.054062661 13.891123583 19.266228960 9.9621524178 21.408584077 19.493618013 14.309494786 12.260582626 15.647434897 21.055468621 19.247687202
14 13.194693197 14.631494153 15.856570574 22.970092120 17.915885630 19.242885655 12.931181001 20.119837717 14.900429771 20.056211580 16.331541361 21.383762010 13.642225493 22.043141368 18.906400268 15.233002306 13.672780911 16.655525449 17.484172823 16.221265369
15 14.454841042 11.648342050 24.013949610 15.369467111 14.670923487 17.974684824 15.868549635 20.405450873 15.473457540 18.928542591 11.294995354 15.980641896 12.256423303 21.017524154 16.891029303 23.037211061 17.899929267 12.651977564 24.648750857 19.873248845
16 15.162968795 19.639371471 17.857764185 14.254025492 14.855828148 13.061324347 18.833872563 15.431341378 19.895267763 14.061215637 9.0377963768 17.855819531 17.540630900 14.883991950 18.965575529 13.639079347 19.603297677 13.439517808 16.590155880 19.523601747
17 12.837580146 17.300399618 16.397478005 16.134865419 16.103057077 15.369115379 19.374432295 20.779291327 15.265485804 13.704954390 15.628713969 16.076636436 19.408045925 15.683427884 16.291742210 10.069125489 16.287703278 21.867653314 22.416234965 19.262854472
18 19.259018783 15.257768897 16.785418759 21.260118338 15.677760704 14.357333776 23.953976045 19.282614654 13.674361878 17.816817946 15.217776127 20.241922141 11.085892612 17.815810247 19.378555230 14.612532888 24.812538004 14.364323889 15.780081764 14.714981396
19 17.273139159 11.387533642 22.627546936 21.375990297 10.655865000 16.030982952 10.024525003 14.400949023 18.691168672 18.900912571 17.045991267 20.677973525 14.907173512 11.967337553 10.438227110 10.542564625 15.873437549 13.379645381 19.807975072 14.895945857
20 21.202541530 13.556790306 17.853675839 29.477538601 10.572076371 17.363820998 14.806347639 22.117892710 15.933827287 17.203525559 11.368432636 18.245208170 18.990416985 4.7027461535 14.106131619 10.641799847 10.408941079 20.777613103 11.795461804 12.630202498
21 12.796793182 15.773744613 15.718249122 19.963771778 17.913609017 20.346235591 16.37117457 14.140827390 14.602168479 17.488279820 15.219666717 21.920339606 20.852590363 17.272757766 16.288534379 16.18716477 21.007612886 8.5559464115 15.893066626 21.826958274
22 24.624710668 16.069025488 22.666227349 18.037411809 27.257548515 20.972877515 17.208146598 9.5079949914 17.725609016 12.731988675 10.778251667 14.671619454 12.163095265 15.441280395 20.953734776 16.919735736 18.868862334 16.29599891 13.334413786 12.704157106
23 12.483096026 11.946369811 12.339421920 15.147686955 14.527670072 10.833025550 13.845332287 21.911851766 17.844016868 6.4579260977 19.644619454 12.794401158 18.763484494 11.035744398 16.955847915 14.676523133 12.972105711 12.873608807 10.649700210 16.249901868
24 16.055065780 15.718901369 14.448858308 15.415482110 11.415472567 18.110306585 3.9607486057 8.1479900587 14.059588701 15.889891848 7.0088332836 9.4309431795 15.845699919 15.791353109 20.076475668 7.5854297587 22.602857702 12.355170419 11.005169255 15.745136871
25 11.520174331 14.954797773 22.259818266 13.165088749 13.126781593 18.147794519 21.700549797 6.1373442071 18.769328910 15.999810053 15.697534802 8.7046124041 13.484268106 15.129676248 18.840689093 15.679370400 20.836417301 15.054009287 7.1663405669 16.180947280
26 12.114512747 15.917094504 18.620215742 10.351909389 8.7576042079 13.743220640 13.897635317 20.345677352 15.258204144 8.0490819951 13.483042698 11.865341951 12.830482017 18.854000518 17.811919061 9.6340097745 12.847855025 17.658885858 11.195798241 16.571380992
27 12.972379706 13.383335562 14.907031454 11.667970154 17.337349334 13.708148903 5.7516047944 13.386322550 14.204851747 20.245806929 13.859393050 17.401612326 11.511880945 16.727165924 17.600784021 9.0785377868 14.772959933 14.456730758 19.702350584 16.263902923
28 8.3589961638 15.836127037 9.9075516103 12.020445900 5.5321130253 15.781505007 17.858418933 17.196733516 10.400215645 19.304113200 14.965371062 11.321894576 10.620214424 10.273787783 18.038739761 15.006525813 11.695124989 9.6315060698 20.874357897 16.041908265
29 19.832173728 15.350912069 19.096874892 11.839400723 10.707742878 18.057848564 14.143400186 15.533129157 9.6347373028 17.763350188 21.565538550 11.925199486 16.202911713 12.329697997 7.0666078683 16.864054737 16.432538755 15.682708636 15.629870075 11.626618696
30 9.1336082269 16.734835440 16.303672955 15.647252555 21.227462077 15.246979445 13.870490598 16.260369107 10.985789950 19.139349074 12.669411500 9.2162156247 17.701251333 17.099223729 13.938795089 10.263411129 10.209449378 10.013098680 20.042913883 10.323965633
31 16.830600939 15.899708500 17.994433276 14.022881813 8.8201047171 15.166643153 16.121300006 5.9977256359 14.552397249 12.769804459 20.683788498 12.800547905 20.587807785 14.960052391 19.117280213 16.738430635 11.381417082 13.884826614 10.678398963 11.744003718
32 2.5455759682 11.167388229 12.001015067 8.5252550907 12.106754732 5.9095881708 9.0788362923 12.695584855 10.573141169 16.931134537 11.978337043 15.457973683 12.641869879 14.039175052 16.132021646 14.881753179 14.707711828 13.220804022 18.954078041 11.453939471
33 10.340103677 13.152463612 12.313708057 17.202817407 8.3770586064 10.899766154 19.410036581 8.7517310386 12.795078922 16.207225876 16.565272870 18.840194543 15.447209604 9.5491493733 20.400673759 8.7924524681 10.512283366 14.853162178 11.694942986 14.664266453
34 9.1648069807 13.142563764 16.640327351 14.807737774 15.786979317 10.243536154 15.939479476 7.0901892510 12.539978753 14.279365366 14.189998939 12.424970745 11.680430820 15.359536224 15.226214412 9.8812654059 9.1377612120 18.647584458 21.769559325 12.415256939
35 10.997245926 11.386354026 6.5511211883 5.0280488653 7.4312099735 10.655762189 18.312549109 15.114563374 10.997795503 13.276240321 5.8047601949 9.5894713129 21.487791873 16.522352621 8.1875301121 9.7031038010 14.298287713 15.655990938 9.5556581632 13.989847130
36 12.492156186 13.913829044 15.969843861 3.1250291046 14.029712178 18.157203161 17.647404631 16.394583246 13.228827094 15.975266481 21.048831125 15.290196775 13.717059958 14.940734930 9.7441267023 7.8897814111 17.878099994 12.794408322 10.937630012 16.629853893
37 16.619917735 19.317066841 15.749426233 18.233213327 15.857176476 16.468855601 13.558178217 10.551458936 20.659504784 12.691967584 15.315792422 13.845003663 22.487600047 22.512518520 10.398911757 18.729845352 14.488562202 15.994803663 8.7976171626 12.835860774
38 14.656670854 18.276258062 10.698331299 9.1883256558 22.515826285 16.377230636 18.617116727 17.478180049 20.899958478 13.340250600 12.775606842 22.338441475 14.353452618 19.271873579 15.588369479 17.928941044 17.366277830 11.168237247 15.542523133 12.943245273
39 15.389621659 7.1656202572 18.547353203 13.052914521 10.781152727 12.188430413 15.759254274 13.964578979 9.5791037802 13.216854157 12.168954236 14.163092063 22.573908812 14.628645528 9.8177746092 16.901186442 12.744595234 16.024275870 14.213733230 11.426214527
40 14.324046955 6.2471524868 13.289529628 25.301829767 17.159633755 13.097659175 12.477267561 10.104256035 12.504045205 12.019004841 20.298054885 22.102133308 18.921815826 12.721479842 13.828607306 13.577742421 12.207375043 15.216719104 9.7088454046 11.562433384
41 14.287558964 20.429069682 15.411710871 15.123878453 17.852661336 17.681574718 16.589508306 15.260686902 23.056386791 14.028115940 15.905676275 6.3323028683 9.2767895564 10.007753494 13.346466562 11.736012101 5.0399817731 11.910010289 11.871837022 6.8282773599
42 14.133104442 17.262028318 16.111949983 19.362435153 12.047941075 8.4954426002 9.3757760429 10.192601009 14.430573433 19.922335356 14.995469076 12.133188451 12.921494931 22.262106760 12.024123989 17.253094810 16.344809143 12.849672044 14.305837642 21.270477728
43 13.652949457 17.652430773 15.352310346 15.871823129 12.406499823 17.320250074 14.733223512 17.132556672 19.218200751 13.625347887 11.622717956 8.6428946872 14.413373179 18.658896432 10.283679799 8.5640179224 23.231141806 13.587958750 15.077575293 17.890601278
44 17.606633861 16.103430970 13.352526831 16.356696395 16.942600510 16.292124644 11.766746658 17.553228686 13.407591187 8.4289961628 15.696021613 10.927472807 16.982326328 19.403167722 12.649443468 23.553268829 17.130898106 11.650301537 10.605452461 13.152733752
;
run;

 

Jweinstein2001
Calcite | Level 5

The code above is pasted like that, but the code I have written has the data lined equally in rows and columns. Yet the data is still not registering and only one or two numbers is appearing after the code is finished.

PaigeMiller
Diamond | Level 26

Now show the code you tried to use to get an XCHART.

--
Paige Miller
Jweinstein2001
Calcite | Level 5
proc shewhart data=Partgaps;
xchart Partgap*Sample;
run;

The problem is within how I'm entering my data though, because the xchart wont go through since the data isn't even recognized for some reason. I have no idea how its entered wrong or what I'm doing wrong. Thank you very much btw
PaigeMiller
Diamond | Level 26

Let me see ... you want the x-bar at each individual sample point to be computed from the 20 numbers shown for each sample. Is that correct?

 

You said:

 

The problem is within how I'm entering my data though, because the xchart wont go through since the data isn't even recognized for some reason. I have no idea how its entered wrong or what I'm doing wrong.

 

Stop. We don't know what you are doing that will cause something to happen incorrectly. You have to stop telling us that something isn't working and then provide no other details. You have to SHOW US what isn't working. If there are errors in the LOG, show us the ENTIRE log. If the output is not correct, show us a screen capture of the incorrect output, and then tell us what you think it should be.

--
Paige Miller
Jweinstein2001
Calcite | Level 5
"I can't see the data. I cannot download attachments." This makes it very hard to be able to show what is happening wrong when I'm not able to upload attachments of my work.
PaigeMiller
Diamond | Level 26

You can make screen captures of output and include them in your reply by clicking on the "Insert Photos" icon. You can include LOG as text by clicking on the </> icon and pasting the text into the window that appears.

--
Paige Miller
Jweinstein2001
Calcite | Level 5

output sas.PNG

The output is not recognizing any of the values that I have inputted

Kurt_Bremser
Super User

Please do always (as in ALWAYS) post logs by copy/pasting the text into a window opened with this button:

Bildschirmfoto 2020-04-07 um 08.32.59.jpg

 

Your datalines use tabs as delimiter, so add an INFILE statement:

infile datalines dlm="09"x dsd truncover;
Jweinstein2001
Calcite | Level 5
Thank you so much, and sorry this is only my second day using the help forums, thank you for the help and next time I will use that button to copy and paste logs.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 17 replies
  • 908 views
  • 1 like
  • 3 in conversation