Well, I am more advanced than that. I managed already a short report such as:
ODS RTF FILE="&path.ODSreport.rtf" style=analysis
sasdate
startpage=never
nogfootnote;
footnote "author V. Storme";
ODS ESCAPECHAR='^';
* ODS noproctitle;
title justify=right 'Page ^{pageof}';
title '^S={preimage="G:\vesto\VESTO\Templates\psb_small.jpg"} ^{newline 2}';
options orientation=portrait;
ods graphics on / width=8cm height=6cm;
title2 "^{newline 1} Sample size calculation for the flower phospho proteomics data. ^{newline 1}" ;
proc odstext;
p 'A pilot study was performed on wheat under two temperature conditions with 3 biological replicates for each condition.
5581 peptides were identified. The data set contained 114580 zero values. For the purpose of sample size calculations,
only the 2991 peptides were used with no zero values.' ;
p 'Mean and standard deviation (SD) of the log2 intensity values of each peptide were calculated.';
p 'The median, quartiles, 10th and 90th percentile of these means and SDs were calculated and listed below.';
run;
title2;
proc means data = &lib..descr P10 P25 P50 P75 P90 maxdec=2 ;
var mean;
run;
* 22.4 23.4 24.6 25.8 27.1 ;
proc means data = &lib..descr P10 P25 P50 P75 P90 maxdec=2 ;
var SD;
run;
proc means data = &lib..descr noprint P50 P75 maxdec=2 ;
var SD;
output out=quantiles P50=p50 P75=p75 ;
run;
* 0.10, 0.17, 0.30, 0.56, 0.92 ;
data _NULL_;
set quantiles;
call symput('P50',strip(put(P50,5.2)));
call symput('P75',strip(put(P75,5.2)));
run;
proc odstext;
p "The interest is in detecting a two-fold change between the two temperature conditions at a p-value
of 0.004. This was the threshold p-value to obtain an FDR adjusted p-value of 0.05 in a related sudy.
A sample size calculation was performed assuming a SD of &P50 and &P75, corresponding to the median
and upper quartile of all SDs of the 2991 peptides. A power of 85% was taken. The sample size calculation
was performed with the proc power for a T-test assuming equal variances and equal group sizes. The plot is shown below.";
run;
* sample size calculation for ttests;
* assuming unequal variances, one setting;
* Satterthwaite unpooled t-test;
* effect size 2 fold change;
* based on data Jelle, a p-value of 0.004 was required to obtain an FDR adjusted value of 0.05;
* take 0.001 to be on the save side;
*ods rtf startpage=now ;
ods select PowerPlot;
proc power;
twosamplemeans test=diff sides=2
meandiff = 1
stddev = 0.30 0.56
groupweights = 1|1
power = 0.85
alpha = 0.004
ntotal = . ;
plot y=power min=0 max=1 yopts=(ref=0.9 crossref=yes) vary (color) ;
run;
* 6 samples in each group are required for a sd of 0.30 ;
* 13 samples in each group are required for a sd of 0.56 ;
proc odstext ;
p "In conclusion, 6 samples are required for each temperature condition for a SD of &P50 and 13 for a
SD of &P75.." ;
run;
ods rtf close;
... View more