Question: What is being tested for in the following code and analysis? a ) What is p for the mathematical formulation used in the code below

What is being tested for in the following code and analysis?
a) What is p for the mathematical formulation used in the code below for the analysis?
b) What conclusions can you make from the plot below? Give justification for your answer.
c) Compare the plot produced by proc sgplot data= chiplot at the end of this question below with the plot reported in previous question. What can you conclude about the distributions by comparing the plots?
Left image is previous question, right image is plot from this question.
Code used:
proc iml;
use Dataset_new;
reset print;
read all var {x1_x2 x1_x4 x2_x3} into x;
centre = mean(x)
cov = cov(x)
cor = corr(x);
y = t(x-centre);
d2= t(y)*inv(cov)*y;
mahala = vecdiag(d2);
ranks = rank(mahala);
p = ncol(x);
n = nrow(x);
f0=(ranks-0.5)/n;
chiq = cinv(f0,p);
chiplot = mahala || chiq;
create chiplot from chiplot[colnamme ={'MAHDIST' 'CHISQ'}];
append from chiplot;
quit;
proc sgplot data = chiplot;
scatter y = MAHDIST x = CHISQ;
run;
What is being tested for in the following code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!