Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
sahayseema47
Calcite | Level 5

Dear Experts,

 

I am a newbie here on the SAS platform. I am trying to calculate the exact p-values. While running the script, I am getting warnings 

WARNING: Computing exact p-values for this problem may require much time and memory. Press the
system interrupt key to terminate exact computations.
WARNING: There is not enough memory available to compute exact p-values.

 

In the output file, I can not see the exact p-values.

Exact Pr >= Chi-Square
.

 

The code I am using is

proc npar1way wilcoxon correct=no data=VRS;
class genotype;
var A1;
exact wilcoxon;
run;

 

Few lines of the data structure are below (Excel sheets)

genotype A1 A2 A3
Pi 1.6092 9.4472 10.3580
Pi 1.5242 6.9565 7.8193
Pi 1.7642 10.9033 12.1278

 

 

I will be pleased with the help I get.

 

Sincerely 

Seema

3 REPLIES 3
ballardw
Super User

@sahayseema47 wrote:

Dear Experts,

 

I am a newbie here on the SAS platform. I am trying to calculate the exact p-values. While running the script, I am getting warnings 

WARNING: Computing exact p-values for this problem may require much time and memory. Press the
system interrupt key to terminate exact computations.
WARNING: There is not enough memory available to compute exact p-values.

 

In the output file, I can not see the exact p-values.

Exact Pr >= Chi-Square
.

 

The code I am using is

proc npar1way wilcoxon correct=no data=VRS;
class genotype;
var A1;
exact wilcoxon;
run;

 

Few lines of the data structure are below (Excel sheets)

genotype A1 A2 A3
Pi 1.6092 9.4472 10.3580
Pi 1.5242 6.9565 7.8193
Pi 1.7642 10.9033 12.1278

 

 

I will be pleased with the help I get.

 

Sincerely 

Seema


Since the second warning says that your system does not have enough memory to compute exact p-values you should not be surprised the exact is not in the output.

You don't say how many records you have in your data but some computations with many records take a lot of memory. The first warning SAS tells you that. The second means that with that data set, those options and that variable (likely others as well) you will need to drop the requirement for exact to get usable output.

sbxkoenk
SAS Super FREQ

Hello @sahayseema47 ,

 

"Exact statistics" as an activity is extremely resource intensive, which is not surprising if you know how exact statistics work.

https://support.sas.com/rnd/app/stat/topics/exact-methods.html

But why are you doing an exact test? The word 'exact' is tempting of course, but you should only work 'exact' if asymptotic methods don't work (because of unmet assumptions).

 

So first, try to find out if you really need exact statistics.

If yes, and exact tests do not give you output (because of lack of resources), you can:

  • raise the memory (memsize option)
  • make a model (instead of doing a mere hypothesis test) ... the model-approach is very flexible and versatile.
  • approximate the exact results by techniques like bootstrapping, Monte Carlo Simulation and so on.
  • Last ... there's also a software package that specializes in exact statistics and optimal CPU / memory management therefore. This software package is based on SAS, but is not developed nor marketed by SAS.

 

Kind regards,

Koen

Ksharp
Super User
Yes. Exact test would cost you lots and lots of resource .
But you could try to
requests Monte Carlo estimation of exact p-values instead of direct exact p-value computation.

Check option MC and MAXTIME= of EXACT statement .

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 3 replies
  • 2893 views
  • 3 likes
  • 4 in conversation