I want to do Multivariate Multiple Regression test that simultaneously tests all regression parameters to be zero.
I can do this in PROC REG, but I can't figure out if it is possible to do perform the calculation using PROC GLM.
Below is a minimial working example. I want an invocation of GLM which gives me Wilks test:
Statistic Value F Value Num DF Den DF Pr > F
Wilks' Lambda 0.86889685 3.49 4 192 0.0088
The actual value will depend on the simulation.L
Can this be done?
data thedata(keep=x1 x2 x3 x4);
retain seed 0;
do i=1 to 100;
x1 = rannor(seed);
x2 = rannor(seed);
x3 = rannor(seed);
x4 = rannor(seed);
output;
end;
run;
PROC REG DATA=thedata;
MODEL x1 x2 = x3 x4;
MTEST x3,x4;
RUN;
I believe that in PROC GLM you need to use a CONTRAST statement before the MANOVA statement, something like
CONTRAST 'All Zero' x3 1,x4 1;
I believe that in PROC GLM you need to use a CONTRAST statement before the MANOVA statement, something like
CONTRAST 'All Zero' x3 1,x4 1;
This does exactly what I wanted. Thanks a lot.
Another option is Proc CALIS with a path analysis model.
If don't want to restrict the paths to be equal for X1 and X2,
use different path names.
ods html path="c:\temp"; ods graphics on;
proc calis data=thedata method=ml kurtosis modification plots=residuals effpart;
path
X3 X4 ---> X1= P_X3_X1N2 P_X4_X1N2 ,
X3 X4 ---> X2= P_X3_X1N2 P_X4_X1N2;
var X1-X4;
TestPath=P_X3_X1N2 - P_X4_X1N2;
testfunc TestPath;
run;
ods graphics off; ods html close;
I think the test statistic will be a Wald statistic.
Hope this helps.
Brandy
I'm not familiar with PROC CALIS, so I at the moment so I can't tell if it performs the test I'm looking for - but
this is definitely helpful and worth looking into.
I'm not all that familiar with PROC CALIS either, but I have two concerns
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.