Skip to content

how to perform power analysis and sample size estimation/projection using R

2 messages · Waverley, Christos Hatzis

#
Hi,

I have a question in regarding to how to perform power analysis and
sample size estimation/projection using R?

I know power.t.test.  It works really well with only one feature analysis.

 I have a set of features which collectively can discriminate binary
classes.  I can do power.t.test for each one feature to get a
distribution for the sample size estimation to achieve certain power
and significance.  But how to evaluate such that this set of features
is analyzed simultaneously as "one group" for the power analysis and
sample size estimation.  I also knew samr package has some utility you
can do this but it seems does not work well in my situation.

Please advise.

Thanks a lot in advance for the help.
#
Ok.  So you have a set of features, which when combined in a certain way
predict a binary outcome, i.e. a multi-feature binary predictor.

You have to decide first what is the hypothesis that you want to test
regarding this predictor in the study that you're designing.  E.g. that
prediction accuracy will be greater than a min value, or the positive
predictive value of the test will be greater than the class-prevalence for
the population under study etc.  Having decided that, you will then need to
specify a null level (e.g. accuracy at least A0=70%) and an (expected)
observed level at which the study will have the stated power to reject the
null hypothesis (e.g. A1=80%).  Then you can use the power of a test on
proportions to estimate sample size for a given power, significance , etc.
Several such tests are given in package 'pwr'.

-Christos