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;
There is no warning.
Is there any other solution for this?
Hello, will you please post your full log for further diagnoses?
Thank you
A log appears saying that there is not enough memory.
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.
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.
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.
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.
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!
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.