Calcite | Level 5

## Prediction Ellipse Function

Hi users and members, is it possible to get the function of a prediction ellipse or at least the length, height and centre? If yes, then how do i add this to my code?

Code:

/* 95% prediction ellipse */
proc sgplot data=combined_values;
scatter x=new_x y=new_y / markerattrs=(symbol=circlefilled);
ellipse x=new_x y=new_y / alpha=0.05 lineattrs=(thickness=2 color=red) type=prediction;
title "diagram";
xaxis label="x-Werte" min=0 max=&max_val;
yaxis label="y-Werte" min=0 max=&max_val;
run;

Diamond | Level 26

## Re: Prediction Ellipse Function

https://blogs.sas.com/content/iml/2014/07/23/prediction-ellipses-from-covariance.html

Why do you need this prediction formula, what would you do with it if you had it? If you want to determine if additional points (not the ones used to create the ellipse) are within the ellipse, you can just add these additional points to the plot. Example:

``````data additional;
height1=60; weight1=80; output;
height1=70; weight1=95; output;
height1=80; weight1=50; output;
run;

data class;
run;

proc sgplot data=class;
scatter x=height y=weight / markerattrs=(symbol=circlefilled);
ellipse x=height y=weight / alpha=0.05 lineattrs=(thickness=2 color=red) type=predicted;
scatter x=height1 y=weight1 / markerattrs=(symbol=plus);
run;

``````
--
Paige Miller
Discussion stats