2
$\begingroup$

The study involves 10 subjects, in which we measure speed with 4 different shoes, and the measurements are repeated 4 times, and this is done on two different tracks, indoor and outdoor.

On the one hand, we are only interested in reporting if there are differences for all measurements, between indoor and outdoor. That's why I understand that it is a paired T-Test. It would be correct?

In that case, how could you calculate the sample size? I understand that the sample size in this case would be equal to 160, 10 x 4 x 4.

Furthermore, how should I calculate the sample size for repeatability? That is, if I have 10 subjects, as they have repeated with 4 shoes, in reality the sample size would be 40, and the repeated measurements would be 4, right? How many times would it really have to be repeated for that sample of 40?

I've seen some bland altman papers for within-subject standard deviation.

$\endgroup$
3
  • $\begingroup$ Any chance you can post the data? $\endgroup$
    – dimitriy
    Commented Jun 4 at 18:45
  • $\begingroup$ Yes sure, I can share the data $\endgroup$
    – mdscience
    Commented Jun 5 at 6:10
  • $\begingroup$ You can just add it to the question! $\endgroup$
    – dimitriy
    Commented Jun 5 at 18:32

4 Answers 4

1
$\begingroup$

No, it's not a paired t-test. For one thing, you have four different shoes, not two.

I think these data should be analyzed with a multilevel model where the dependent variable is speed, the independent variables are shoe and type of track (and maybe their interaction) and the repeating variable is person.

There is no single definition of sample size here. You have 40 people but 160 observations.

I don't know what "sample size for repeatability" means.

$\endgroup$
1
  • $\begingroup$ My only interest is know if there are differences between indoor and outdoor. After this I want to analyze reliability, and after this using standard error of measurement, contextualize results. $\endgroup$
    – mdscience
    Commented Jun 3 at 13:04
1
$\begingroup$

The only way to shoehorn your example into the standard paired t-test framework is to average the indoor and outdoor speeds across shoes and trials for each runner. This gets you down to N=10 but does satisfy all the test assumptions. The averaging may smooth the times enough that this is not a big hit in terms of power.

Another option is to calculate the mean indoor-outdoor difference but then adjust the standard errors for the ten runner clusters. This will give you a confidence interval for the difference. If it contains zero, you cannot reject that there is a track difference. If it does not, then you can reject the null.

Regression of speed on controls for shoe, runner, track, and (maybe) trial, while clustering the SEs by runner, may be a middle ground to doing an a full-blown LMM. The null hypothesis here is that the coefficient on track type is zero.

$\endgroup$
2
  • $\begingroup$ Finally I think I will choose to try to carry out a mixed model. I will also include more subjects in the study, I think I will be able to increase the sample by 3 or 4 more subjects. In this case, what assumptions should the variables follow? I suppose that, as happens in an anova, the assumptions of normality must be met, as well as equality of variances. Or would it be something different for mixed models? In your case, could they be carried out in software such as JASP or Jamovi? $\endgroup$
    – mdscience
    Commented Jun 5 at 13:38
  • $\begingroup$ I have not used either one, so cannot say. Normality or equality of variances is not required. $\endgroup$
    – dimitriy
    Commented Jun 5 at 18:34
0
$\begingroup$

A few thoughts. First I agree with Peter's assertion that this is not a paired t-test. Personally, I would conduct a mixed-effects regression analysis. For example,the following model might be used for your research with $y_{ijkt}$ being the average of each participant's four speed measurements. If you wanted to test for change over time you would need to add a variable to capture which of the four measurements it was for each combination of shoe and track variables). Regardless, your sample size would be 10 as the sample size = the number of subjects participating. This is a relatively small sample size and could adversely impact both power and generalizability of fixed effects and the ability to precisely estimate variability between individuals. Ideally, I would try to get more participants regardless, but if you cannot, then I would suggest including the measurement variable ($Run_t$) to mitigate the concerns created by a small sample size.

Therefore, there would be 10 participants, four shoes, and two tracks, meaning that each of the 10 participants will have 8 different combinations of shoe-track conditions. With 4 runs per condition combination this results in a total of 320 observations, however one should not confuse sample size and number of observations. Also, you could reduce the complexity of this model at the expense of power and precision by averaging the 4 speed measurements for each shoe-track combination. Though if you care about fatigue or learning-effects, do not average the 4 measurements.

$\beta_n$ = fixed effects (effects of run number, shoes and track that apply to all runners), $u_i$ = random effects $i= runner$

  • $y_{ijkt}:$ Speed measurement for subject $i$, shoe $j$, track $k$, and repetition $t$.
  • ${Shoe}_{j}$: Dummy variables for the 4 different shoes. (Note, this is represented as three separate binary variables. E.g. for $Shoe_1j$ j=0 or 1 with 0 being the reference level (Shoe A), and 1 being Shoe B, for $Shoe_2j$ j=0 or 2 representing Shoe A and Shoe C respectively, for $Shoe_3j$ j=0 and 3 reresenting Shoe A and Shoe D respectively.
  • $Track_{k}$: Dummy variable for the 2 different tracks (indoor and outdoor).
  • $u_i$: Random intercept for subject $i$.
  • $u_{ij}^{Shoe}$: Random slope for the interaction between subject $i$ and shoe $j$.
  • $u_{ik}^{Track}$: Random slope for the interaction between subject $i$ and track $k$.
  • $\epsilon_{ijkt}$: Residual error term.

Model without interaction terms $ y_{ijkt} = \beta_0 + \beta_1 \text{Shoe}_{1j} + \beta_2 {Shoe}_{2j} + \beta_3 {Shoe}_{3j} + \beta_4 \text{Track}_{k} + \beta_5 \text{run}_{t}+ u_i + \epsilon_{ijkt} $

However, it should be noted that there will likely be some interaction effects between the individual runner variable, the shoe variable, and the track variable.

$y_{ijkt} = \beta_0 + \beta_1 \text{Shoe}_{1j} + \beta_2 \text{Shoe}_{2j} + \beta_3 \text{Shoe}_{3j} + \beta_4 \text{Track}_{k} + \beta_5 (\text{Shoe}_{1j} \times \text{Track}_{k}) + \beta_6 (\text{Shoe}_{2j} \times \text{Track}_{k}) + \beta_7 (\text{Shoe}_{3j} \times \text{Track}_{k}) + \beta_8 \text{Run}_{t} + [u_i + (u_{i1}^{\text{Shoe}_{1}} \cdot \text{Shoe}_{1j}) + (u_{i2}^{\text{Shoe}_{2}} \cdot \text{Shoe}_{2j}) + (u_{i3}^{\text{Shoe}_{3}} \cdot \text{Shoe}_{3j}) + (u_{ik}^{\text{Track}} \cdot \text{Track}_{k}) + (u_{it}^{\text{Run}} \cdot \text{Run}_{t}) + (u_{ijk}^{\text{Shoe} \times \text{Track}} \cdot (\text{Shoe}_{j} \times \text{Track}_{k}))] + \epsilon_{ijkt} $

As for how to actually conduct mixed-effects regression, I will leave that to you to search as the process depends largely on what software package you're using. However, here is a link to a guide for doing it in R: https://www.learn-mlms.com/index.html

$\endgroup$
6
  • $\begingroup$ Why is not correct to analyze all data together for indoor and outdoor and do a T-Test? $\endgroup$
    – mdscience
    Commented Jun 3 at 13:02
  • $\begingroup$ A t-test is used to compare means between two groups based on a single factor and cannot compare multiple factors or address repeated measures and thus aggregating data across the run and shoe factors would result in a loss of information about variability and interactions between factors, Your analysis employs what is known as a factorial design. Specifically, you have a 2x4x4 factorial design (factorial designs are labeled by the number of levels in each factor, in this case the track factor has 2 levels, the shoe factor has 4, and run # has 4. There will be one numeral for each). 1/2 $\endgroup$ Commented Jun 3 at 14:01
  • $\begingroup$ Also, t-tests assumes an independence of observations. With repeated measures of the same subject, especially in this setting where fatigue and learning can impact subsequent measures, the observation measurements are not independent. (Not to be confused with paired t-tests where observations are paired between samples, which is what you're asking about in your comment. In your scenario, if you only measured speed on both tracks, you would take the differences for each runner and use that data to calculate the mean difference and standard deviation and then calculate the test statistic). $\endgroup$ Commented Jun 3 at 14:22
  • $\begingroup$ Bottom line, because of the repeated measures of the subjects across multiple factors, you have to use either linear mixed effects model (what I showed above) or some form of ANOVA (I chose to use linear mixed effects model as I find it more straight forward.) These methods are not exactly the most simple methods to use, but once you understand how LMM works, it isn't too difficult. Though interpreting the output data for LMM involves not only understanding fixed effects regression outputs but also random effects output data (which requires more time to explain than I have available.) $\endgroup$ Commented Jun 3 at 15:05
  • $\begingroup$ I understood the reason for not using paired samples t-test. Interaction of factors or fatigue could mask data. Could I then do a repeated measures ANOVA? I also understood that the sample size would be 10, even though there were more than 10 measurements in each group. The truth is that LMM is very far from my knowledge right now, but if it is the best option I could try to learn it. Another note, we know that significance testing is not always related to practical or real importance. In this sense, what I am looking to do is the following. 1/2 $\endgroup$
    – mdscience
    Commented Jun 3 at 17:59
0
$\begingroup$

As previous responses pointed out, the fundamental reason why you can not use a paired test is that your samples are not independent (the data from the 4 different shoes was done by the the same subjects). If different subjects had used the different shoes in the 2 tracks, then you could (and should) have used a paired t-test.
Now, what you could do (but not the best choice) is run 4 paired t-test (1 for each shoe type), comparing the times on both tracks. Of course you should use an appropriate multiple comparison correction (Sidak?) to deal with this situation. But you run into the risk that some results will be significant for some shoe(s), but not for other(s). It is not clear then what to conclude. But I would still do it, if only just just for fun, or rather to get a feel for the data, and what it might say. At a minimum, I would compute the 4 paired differences, and plot that data, with the confidence intervals of the 4 means, again just to visualize the data. That alone will tell you a lot (e.g. whether there are clear differences, or not, whether the track, or shoes, make a difference, etc.).
As also already pointed out, you could run a LMM. But you seem uncomfortable with this. A final approach (and the one I would adopt), is to run a factorial ANOVA (aka known as a factorial DOE). You have 2 factors (the 4 shoes, the 2 tracks), and 4 replicates for each combination of factors, with one response (the time taken to run the course). Note that this factorial ANOVA will generate a LMM model, tell you which factor(s) are significant, give you factorial plots, will tell if there are interactions between your facftors, etc. ANOVA under the hood is a LMM, so you will get the same results, but you may be more familiar/comfortable with that approach. This is what I would use, because the software I use will set up the LMM more easily and give more results (plots, response optimizer, etc.).
To answer your specific question about sample size, your total sample size is $10*4*2*4=320$, but you only have $4$ samples (replicates) per combination (a given subject, with a given shoe on a given track).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.