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

Hello,

 

I have run into a strange problem. I am running N-way anova and what I have found out is if i change the order of the variables that I am using in the anova, then the P-values are changing

 

E.g. when I run the below procedure

 

ods noproctitle;
ods graphics / imagemap=on;

proc glm data=WORK.INTERNETDATA;
class Exits Continent Sourcegroup Uniquepageviews Bounces Visits;
model Timeinpage=Exits Continent Sourcegroup Uniquepageviews Bounces Visits /
ss1 ss3;
lsmeans Exits Continent Sourcegroup Uniquepageviews Bounces Visits /
adjust=tukey pdiff=all alpha=0.05 cl;
quit;

 

The value of Sourcegroup is significant i.e. 0.0037

 

Now when i change the sequence of the variable Bounces to something like this

 

ods noproctitle;
ods graphics / imagemap=on;

proc glm data=WORK.INTERNETDATA;
class Bounces Exits Continent Sourcegroup Uniquepageviews Visits;
model Timeinpage=Bounces Exits Continent Sourcegroup Uniquepageviews Visits /
ss1 ss3;
lsmeans Bounces Exits Continent Sourcegroup Uniquepageviews Visits /
adjust=tukey pdiff=all alpha=0.05 cl;
quit;

 

The value of the variable Souregroup is no longer significant i.e. 0.0752

 

Can somebody tell me why is this occuring.

 

Thanks and regards,

 

Aditya

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
It is difference between SS3 and SS1.

If you only use SS3 , you will get the same P-value , otherwise if you use SS1 ,you will get different one.


proc glm data=sashelp.class;
class age sex;
model weight=age sex/solution ss3;
run;

proc glm data=sashelp.class;
class age sex;
model weight=sex age/solution ss3;
run;

View solution in original post

1 REPLY 1
Ksharp
Super User
It is difference between SS3 and SS1.

If you only use SS3 , you will get the same P-value , otherwise if you use SS1 ,you will get different one.


proc glm data=sashelp.class;
class age sex;
model weight=age sex/solution ss3;
run;

proc glm data=sashelp.class;
class age sex;
model weight=sex age/solution ss3;
run;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 770 views
  • 0 likes
  • 2 in conversation