SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 24997: Generate confidence ellipses for bivariate normal data

DetailsResultsDownloadsAboutRate It

Generate confidence ellipses for bivariate normal data

Contents: Purpose / Requirements / Usage / Limitations

NOTE: Beginning in SAS 9, you can use the ODS GRAPHICS ON; statement and the PLOTS=SCATTER(ELLIPSE=MEAN) or PLOTS=SCATTER(ELLIPSE=PREDICTED) option in the PROC CORR statement to get confidence ellipse plots about the mean or individual values.
PURPOSE:
The %CONELIP macro generates confidence ellipses for bivariate normal data. It can either create ellipses for the data or ellipses about the mean.
REQUIREMENTS:
The %CONELIP macro requires Version 6.06 or later of Base SAS software and SAS/GRAPH.
USAGE:
Follow the instructions in the Downloads tab of this sample to save the %CONELIP macro definition. Replace the text within quotes in the following statement with the location of the %CONELIP macro definition file on your system. In your SAS program or in the SAS editor window, specify this statement to define the %CONELIP macro and make it available for use:
   %inc "<location of your file containing the CONELIP macro>";

Following this statement, you may call the %CONELIP macro. See the Results tab for an example.

The macro parameters are described below:

DATA=
SAS data set that contains the variables that you want to generate the ellipses for.
X1=
Variable 1 of interest. This variable will be plotted on the horizontal axis.
X2=
Variable 2 of interest. This variable will be plotted on the vertical axis.
MEAN=YES | NO
Tells the macro if you want the confidence ellipse on the mean (YES) or not (NO).
CONF=
Tells the macro at what alpha level you want the ellipse to be computed.
LIMITATIONS:
No error checking is done. The macro assumes that dataset names and variable names entered are valid. The user must also specify the MEAN= and CONF= options.



These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.