BookmarkSubscribeRSS Feed
MECT
Calcite | Level 5

Hello,

 

I have just discovered SAS/IML while looking for a means to identify outliers in multivariate data with 3 dimensions. It looks as if either the Minimum Volume Ellipsoid (MVE) or Minimum Covariance Determinant (MCD) may be just what I need. I have looked at the Robust Regression examples within the SAS documentation as well as "Detecting outliers in SAS: Part 3: Multivariate location and scatter" (Wicklin, 2012). Using those sources I have managed to run both MVE and MCD and get estimated outlier, however, I cannot graph the data. I have pasted below the example in the SAS documentation using the stackloss data where a subroutine SCATMVE is used. It seems to be in a library file called robustmc.sas which I do not seem to have. I am running SAS version 9.3 (although I can upgrade to 9.4). I just feel like there are some key points missing in the example and I would be grateful for any assistance.

 

Thank you

 

 

The following specification generates three bivariate plots of the classical and robust tolerance ellipsoids. They are shown in Figure 12.5.5, Figure 12.5.6, and Figure 12.5.7, one plot for each pair of variables.

optn = j(9,1,.); optn[5]= -1;
vnam = { "Rate", "Temperature", "AcidConcent" };
filn = "stlmve";
titl = "Stackloss Data: Use All Subsets";
%include 'robustmc.sas';
call scatmve(2,optn,.9,a,vnam,titl,1,filn);
1 REPLY 1
Rick_SAS
SAS Super FREQ

I know longer have SAS 9.3 installed, and I don't remember the details from that era, but the current SAS/IML documentation answers your question. In SAS 9.4 you can  %INCLUDE the robustmc.sas file and then use the functions. The example shows the details, but it begins with 

 

%include sampsrc(robustmc);   /* define graphing modules */
proc iml;
load module=_all_;            /* load graphing modules */

Although I don't remember the 9.3 details, I think you can follow the instructions for "Accessing documentation and sample programs" to get to the 9.3 programs. If necessary, you can copy the programs onto your local computer or cut-and-paste directly into your program.

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!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 1 reply
  • 668 views
  • 0 likes
  • 2 in conversation