0todd0000 / spm1d

One-Dimensional Statistical Parametric Mapping in Python
GNU General Public License v3.0
61 stars 21 forks source link

Sample size calculation #237

Closed SimonBarruebelou closed 7 months ago

SimonBarruebelou commented 1 year ago

Hello,

We are currently working on a descriptive project in which we would like to publish normative data of a continuous variable (torque-angle relationship). The first step of our work is a pilot study, because we do not already know the variability of the data in the population through the entire range of motion. So, we decided to include 2 groups of 35 subjects (sex stratification), in order to observe the variability between the subjects and with the aim of calculate the sample size necessary to obtain normative data in a next study. Our idea was to realize several sample size calculations, corresponding to different desired power (0.8 to 0.95, for example).

We are going to manipulate the data with SPM, to compare groups and conditions. But for a priori sample size calculation, I’m wondering if I have different possibilities or not :

Many thanks in advance for your help

Simon

0todd0000 commented 1 year ago

Your solution is certainly one possibility. Another possibility is to use scaled noise, as demonstrated in the scaled noise example from power1d. This noise model can be used to scale another type of noise (e.g., smooth gaussian), and the scale itself can be a 1D array, like the standard deviation from a pilot study.

Sample-size calculations require the definition of a 1D effect, which can be most easily constructed using a 1D noise model and a 1D signal model. Please refer to this example.