Quartz | Level 8

## How do I do a sample size calculation based on AUC in SAS?

So I am trying to replicate this statement in SAS (basically to come up with the 300 patients part), but I can't seem to figure out how:

60% of the patients will be considered adherent, 300 patients will allow an AUC of 0.80 to be estimated with an accuracy (i.e. half width of the 95% confidence interval) of 0.049

2 REPLIES 2

## Re: How do I do a sample size calculation based on AUC in SAS?

Some things to consider.  AUC is likely lognormally distributed.  Iget something like this from:

``````proc power;
OneSampleMeans test = t Dist = LogNormal
Alpha = 0.05
Sides = 2
Mean = 0.8
NullMean = 0.79
CV = 0.06125
Power = 0.8
NTotal = .
;``````

Where I got the CV as .049/0.8.

This may just be coincidental, though.

Steve Denham

Fluorite | Level 6

## Re: How do I do a sample size calculation based on AUC in SAS?

This simple macro below gives you the figures using the formula in Hanley JA, McNeil BJ. The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology. 1982 Apr;143(1):29-36.

N=302

%macro power_auc(a=, k=, j=, out=);

data a;

call streaminit(11);
do i=1 to 1;

AUC=&a.;
Q1=(AUC / (2 - AUC));
Q2=(2*AUC**2)/(1+AUC);
N1=&k.;
N2=&j.;
SE=sqrt(((AUC*(1-AUC))+(N1-1)*(Q1 - AUC**2)+(N2-1)*(Q2-AUC**2))/(N1*N2));

output;
end;

proc print;
run;

%mend;

%power_auc(a=.8, j=151, k=151, out=a8_n302);

Discussion stats
• 2 replies
• 3375 views
• 0 likes
• 3 in conversation