-
Notifications
You must be signed in to change notification settings - Fork 2
Continuous vs Discrete designs
When designing TMS experiments, researchers often choose to use discrete levels of stimulus parameters, present multiple repetitions of those parameters within the experiment, average across repetitions per condition and subject, then perform some sort of group-level analysis (t-test, ANOVA, correlation, or curve-fitting).
This is likely a statistically sub-optimal approach when the underlying variables being studied are continuous rather than discrete. This is explained below, and a numerical simulation is provided.
Typical continuous variables in TMS research include:
- TMS intensity (eg for recruitment curves)
- TMS latency (eg for single- or paired-pulse protocols)
Discrete experimental designs include:
- Recruitment curves with several values of TMS intensity (eg, 100%, 120%, 140% MSO)
- Paired-pulse experiments with several values for inter-pulse latency (SICI/ICF: 1,2,5,10,15,20; SAI: N20+2, N20+4, N20+12ms)
Good reasons to use a discrete design may include if it is really not possible to randomise and/or present the stimuli (ie, TMS intensity or time) as continuously as you wish. For example: if you can't control the TMS parameters (eg %MSO) with a cable / automatically.
A statistically more powerful approach is to study the full range of the continuous variable and not to 'clump' together levels of the independent variable.
Assuming that the variable really is truly continuous (this is likely true for %, ms), then, on average, continuous sampling will give larger r2 values (or t-test scores) and smaller p-values for the same data - so, greater power.
Continuous designs also give you the possibility of discovering non-linear trends in your data (sigmoidal, sinusoidal, logarithmic), which are much more difficult to find with a small number of X-axis values.
A simulation was performed in Matlab. The code is here. The output is below.
N=20 datapoints, sampled between 0 and 1 on X-axis (input). Y-axis values (output) were generated by adding a uniform random number to the X-axis values of between -0.5 and 0.5. The final Y-axis values were then shifted and scaled to a range of 0 to 1. The Pearson correlation between X and Y, r was calculated, with r2, the intercept and slope of the best-fit line, the t-statistic and p-value for the fit. The simulation was run 10,000 times and histograms of r2 and log(p) created.
Two conditions were compared:
- Continuous: the raw X-axis values, ranging from 0 to 1 were used - eg, a simple correlation
- Discrete: X-axis values were converted to either 0.25 or 0.75 - eg, an independent t-test

Figure: The top row shows data from the Continuous design, the bottom from the Discrete design. Exactly the same process was used to create the Y-axis data, the only difference is which X-axis values were used. The left column shows one example dataset from the simulation (the 10,000th), with the raw data shown as open circles, the true relationship between X and Y in the black line, and the fitted values of X and Y for this sample. The middle column shows the histogram of r2 over 10,000 simulations. The right column shows the distribution of log(p) over 10,000 simulations. The vertical red lines in the histograms show the mean.
Across the 10,000 simulations, the different designs produced the following mean {95% confidence interval} values; bold shows the data in the Figure:
| Design | intercept | slope | r | r2 | t | p | N for 90% power |
|---|---|---|---|---|---|---|---|
| Continuous | 0.169 {0.0249,0.333} | 0.661 {0.442,0.871} | 0.741 {0.552,0.872} | 0.549 {0.305,0.708} | 4.69 {2.81,7.55} | 0.000184 {5.42e-07,0.0117} | 12 {6,29} |
| Discrete | 0.119 {-0.0680,0.321} | 0.760 {0.420,1.10} | 0.675 {0.430,0.841} | 0.456 {0.185,0.708} | 3.88 {2.02,6.60} | 0.00109 {3.56e-06,0.0584} | 17 {7,54} |
Using continuous designs wherever possible, and fitting appropriate models to the data (eg, sigmodal or Boltzmann for recruitment curves) will very likely increase the statistical power of your design without requiring any more data collection. For the above simulation, you can achieve 90% power for a 2-sided test with 12 datapoints for the continuous design, and 17 datapoints for the discrete design.