BookmarkSubscribeRSS Feed
robertrao
Quartz | Level 8

Hi,

I have the following table:

I need to make a  Control Chart by Unit

with Average days and number of persons

name       Unit         Days

Kevin      Dep1        0.1

Peter      Dep2        2.0

Sam      Dep3         7.0

Ben      Dep1          3.0

Kim     Dep3           4.0

bill       Dep1           5.0

joe      Dep1           3.0

I have used proc schewhart in the past..But i dont really remember how to do it now??

Thanks

2 REPLIES 2
ChrisHemedinger
Community Manager

PROC SHEWHART (read about Dr. Shewhart here) offers lots of control chart options.

Here's one example that might not make sense for your data, but it gives you a feel for the syntax/mechanics.

Result:

shewhart.png

Program:

data cc;

length name $ 10 unit $ 4 days 8;

infile datalines dsd;

input name unit days;

datalines;

Kevin,Dep1,0.1

Peter,Dep2,2.0

Sam,Dep3,7.0

Ben,Dep1,3.0

Kim,Dep3,4.0

bill,Dep1,5.0

joe,Dep1,3.0

run;

proc sort data=cc; by name unit; run;

ods graphics off;

proc shewhart data = cc

;

  xrchart (days) * unit (name) /

;

run;

quit;

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
robertrao
Quartz | Level 8

Hi Chris,

Thanks a lot for the reply. I also read some literature in the mean while.. I was wondering if I need to set the control limits for my data.

Will SAS set the limits by itself????

Thanks

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 683 views
  • 3 likes
  • 2 in conversation