BookmarkSubscribeRSS Feed
sasinitialuser
Calcite | Level 5

Hello, I am using SAS and the "proc npar1way" procedure to compare two groups.

Using the code below, I was able to generate results, but in some cases, the Hodges-Lehmann estimate is displayed, while in others it is not. Why does this happen?

 

proc npar1way data=A wilcoxon hl;
    class Group;
    var Value;
run;

 

9 REPLIES 9
Ksharp
Super User
Is there any WARNING or ERROR information in your LOG ?

Post your full LOG when your H-L is not displayed.
sasinitialuser
Calcite | Level 5

There is no warning. 

Is there any other solution for this?

tonya_sas
SAS Employee

Hello, will you please post your full log for further diagnoses?  

Thank you

sasinitialuser
Calcite | Level 5

A log appears saying that there is not enough memory.

tonya_sas
SAS Employee
Hi, will you please reply with your PROC NPAR1WAY log that includes your code and generated messages. Thank you
sasinitialuser
Calcite | Level 5

I can't copy the code because of the security of my data.

Below is the code I used and the log accordingly.

 

 

proc npar1way data = aa wilcoxon hl (refclass = "2") median;
class group;
var cost;
run;
warning: There is not enough memory available to compute Hodges-Lehmann estimates.

 

Rick_SAS
SAS Super FREQ

Run the following and tell us the sample size for each group:

 

proc freq data=aa;
tables group;
run;

The HL test is an all pairwise computation, so if the the groups are very large, the computation can be resource intensive. Knowing the sample sizes helps us assess the situation.

sasinitialuser
Calcite | Level 5

The number of samples in each of the two groups is 9800.

 

Please understand that the result of executing the code cannot be pasted as it is.

Rick_SAS
SAS Super FREQ

Here is simulated data that has 9800 observations in each group.

%let n1 = 9800;
%let n2 = 9800;  /* 37 s */
data AA;
call streaminit(1234);
Group = 1;
do i = 1 to &n1;
   cost = rand("Normal", 1);
   output;
end;
Group=2;
do i = 1 to &n2;
   cost = rand("Exponential", log(2));
   output;
end;
run;

proc npar1way data = aa wilcoxon hl (refclass = "2") median;
   class group;
   var cost;
run;

On my old PC, it runs in about 35 seconds and does not give an error. Run this code on your system. Based on what you've said, I suspect you will see
WARNING: There is not enough memory available to compute Hodges-Lehmann estimates
in the log. 

 

If so, run this code:

proc options option=memsize value;
run;

The log reports the amount of RAM that SAS has available. My guess is that your SAS process is using only 2GB of RAM. If you are running SAS on a PC, you can configure it to use more RAM by using the -MEMSIZE=8GB option to increase your available RAM. (See "Changing the command-line invocation for SAS" section in this blog post.) If you are running SAS on a server, contact your SAS administrator and tell him/her that you need more RAM.

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 9 replies
  • 612 views
  • 6 likes
  • 4 in conversation