%macro multireader(T1, T2, delta, na, nn, s2ab, s2w, s2c, r1, r2, r3, k2, k1=1, alpha=.05, tails=2); /***********************************************************************************/ /* Macro based on: */ /* Obuchowski NA. */ /* Multireader, multimodality receiver operating characteristic curve studies: */ /* hypothesis testing and sample size estimation using an analysis of variance */ /* approach with dependent observations. */ /* Acad Radiol. 1995 Mar;2 Suppl 1:S22-9; discussion S57-64, S70-1 pas. No abstract*/ /* available. PMID: 9419702 [PubMed - indexed for MEDLINE] */ /***********************************************************************************/ /***********************************************************************************/ /* Process to use macro */ /* 1) Inputs are T1, T2, delta, na, nn, s2ab, s2w, s2c, r1, r2, r3, k1, k2, alpha, */ /* tails */ /* A) T1 = Control AUC, under alternative */ /* B) T2 = Test AUC, under alternative */ /* C) delta = 0 for superiority, delta= delta for one-sided non-inferiority */ /* D) na = number abnormal */ /* E) nn = number normal */ /* F) k1 = minimum # of readers, k2=maximum number of readers, set equal if */ /* have a fixed number of readers. */ /* G) alpha = Type 1 error for test */ /* H) tails = 1 or 2 sided test */ /* I) the rest are variability or covariability estimates that need estimates */ /* from a dataset or assumptions (see Obuchowski 1995 for guidance) */ /* i) variation attributable to the interaction between reader and modality*/ /* (sigmasquaredAB in Obuchowski 1995), s2ab for macro \ */ /* ii) variation within reader */ /* (sigmasquaredw in Obuchowski 1995), s2w for macro */ /* iii) variation attributable to patients samples */ /* (sigmasquaredc in Obuchowski 1995), s2c for macro */ /* iv) between reader, within modality correlation */ /* (r2 in Obuchowski 1995), r2 for macro */ /* v) between reader, between modality correlation */ /* (r3 in Obuchowski 1995), r3 for macro */ /* vi) within reader, between modality correlation */ /* (r1 in Obuchowski 1995) */ /* 2) Macro estimates power for a minimum and maximum number of readers */ /* based on a fixed na and nn and s2c */ /* 3) Current version of macro only contemplates 2 modalities */ /* 4) Current version of macro only contemplates 1 read for each */ /* case*reader*modality combination, i.e. no replicates */ /***********************************************************************************/ data power; do k=&k1 to &k2 by 1; num_nonc=(k*(&T1 - &T2 - &delta)*(&T1 - &T2 - &delta))/2; den_nonc=&s2ab + &s2w + &s2c*((1 - &r1) + (k-1)*(&r2-&r3)); nonc=num_nonc/den_nonc; num_df=1; den_df=(k -1); if &tails=2 then do; fstar=finv(1-&alpha/2, num_df, den_df); end; if &tails=1 then do; fstar=finv(1-&alpha, num_df, den_df); end; power=1 - probf(fstar, num_df, den_df, nonc); output; end; run; proc print data=power; run; %mend; /* Example of macro call %multireader(T1=.85, T2=.90, delta=0, na=150, nn=150, s2ab=.000187, s2w=0.0001, s2c=0.0004, r1=.4356, r2=.3272, r3=.2917, k1=6, k2=7, alpha=.05, tails=1); */