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

Based on documentation Van elteren test can be computed using PROC FREQ and PROC NPAR1WAY. However, the results are different. Why is this so? Is there a case where the two are equal?

 

Sample code:

 

proc npar1way wilcoxon correct=no data=SimR2;
label "VAN ELTEREN TEST - NPAR1WAY ";
class trt strata;
Var counts;
STRATA stratavar /weight=STRATA;
ods output WilcoxonStrataTest=VanElterenTest
run;

 

proc freq data=SimR2;
title ' Van Elteren test with PROC FREQ';
ods select cmh;
tables trt*stratavar*counts/cmh2 scores=modridit;  /* Row Mean Scores Difference is the van elteren statistic*/
ods output cmh=VanElt;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

It looks like you have the position of the strata and treatment variables reversed in the FREQ step.  See this example that shows the analysis using FREQ.  You get the same results with these statements:

 

proc npar1way;
strata blocks;
class treatmnt;
var consump;
run;

View solution in original post

2 REPLIES 2
Ksharp
Super User

It looks like you are doing two different statistic method.
First is Wilcoxon test which compare two level's mean value.

Second is Freedman Test which compare more than two level's mean value .
Your code is not right, you should put COUNT into WEIGHT statement.

StatDave
SAS Super FREQ

It looks like you have the position of the strata and treatment variables reversed in the FREQ step.  See this example that shows the analysis using FREQ.  You get the same results with these statements:

 

proc npar1way;
strata blocks;
class treatmnt;
var consump;
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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 3342 views
  • 3 likes
  • 3 in conversation