BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
larsa
Calcite | Level 5

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;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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;

--
Paige Miller

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

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;

--
Paige Miller
larsa
Calcite | Level 5

This does exactly what I wanted. Thanks a lot.

brsinco
Calcite | Level 5

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   

larsa
Calcite | Level 5

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.

PaigeMiller
Diamond | Level 26

I'm not all that familiar with PROC CALIS either, but I have two concerns

  1. For those of us who have a background of fitting linear models via regression and ANOVA, the use of PROC GLM and PROC REG seems as natural as waking up in the morning. The use of PROC CALIS to do the same seems as natural to us as trying to chop vegetables with a power saw. Of course, I do know that PROC CALIS does allow you to fit a linear regression and perform these tests, I'm simply saying it doesn't flow smoothly to my brain, and it would probably take me 2 hours to figure out how to get PROC CALIS to give me what I could get in 5 minutes from PROC REG or PROC GLM.
  2. The proposed test in PROC CALIS appears to be the difference between the two coefficients, and this is not the same as testing whether or not the two coefficients are both zero.
--
Paige Miller

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 3459 views
  • 3 likes
  • 3 in conversation