I am really a beginner in stats (and also in r) and would need a input on whether my statistical methodology for following research experiment is right:

Study: I want to test the effect of the duration of a specific exercise (15mn, 20mn, 30mn, 45mn, 60mn) on the occurence of sport related injuries in 13 subjects. My hypothesis is that increased duration of this specific exercise is associated with less injuries.


  • Dependent variable: injury yes/no (binary variable)
  • Predictor variable: duration of exercise (continuous variable)

From my understanding of previous posts, I should use the lme4 package in R (which would help me to take into account repeated measures and to account for random effects)

here the R code I would use:

mydata <-glmer(injury~exercise_duration+(1|patient),data=mydata,family=binomial)

Am I on the good track? Any comment or advice would be much appreciated.


1 Answer 1


Theoretically you are correct, but I think you should try the caret package (r) and use k-fold cross validation. I hope this helps.


Your Answer

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

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