[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SAS Control Chart Question

Posted on 2014-12-15
1
Medium Priority
?
171 Views
Last Modified: 2016-02-13
I am new to SAS. I need to only return control charts that identify outliers.  Below is my current control chart code.  Is there a function or syntax that i could use that would only return outliers.

proc shewhart data=mywork.TREND; by recCd;
xchart BALAMT * MonYr / sigmas=2;
      run;
0
Comment
Question by:Thomask23
1 Comment
 
LVL 8

Accepted Solution

by:
ShannonEE earned 2000 total points
ID: 40501749
Hi there Thomask23,

Ask the procedure to output the chart limits using the outlimits option on XCHART, and then use those limits to select the outliers.


proc shewhart data=mywork.TREND; by recCd;
        xchart BALAMT * MonYr /
                sigmas=2
                OUTLIMITS=WORK.limits(LABEL="Chart limits for BALAMT");
 run;

** Select only the outliers (those beyond the chart control limits givren by _LCLX_ and _UCLX_ **;
** can use SQL or could use a data step **;

proc sql;
        create table Mywork.Outliers as
        select Balamt,
               MonYr
        from  Mywork.Trend
        left join
              work.Limits
        on (Balamt < _LCLX_) or
           (Balamt > _UCLX_);
quit;

Open in new window


More details at

SAS support site

Hope this helps.

Regards,
Ian
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When speed and performance are vital to revenue, companies must have complete confidence in their cloud environment.
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
Suggested Courses

865 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question