I have data that with my best efforts cannot be transformed into something resembling a normal distribution. Or more specifically, the residuals of the linear model I want to run on the data is in no way normally distributed. (I've done exploration of different transformations using the bestNormalize package in R).

My outcome variable is continuous and the covariates are either one dichotomous variable or two dichotomous variables and their interaction.

One of the complicating factors is that the data is nested, i.e. there are multiple observations per each subject in the data.

I was, therefore, searching for a non-parametric version of a linear mixed model. I ran into this very informative post by Jonas Lindeløv, which states that non-parametric tests are linear models on the signed ranks of the outcome variable of interest. He shows in his post that you just first calculate the signed ranks of your data (formula is in the legend of the figure in the post).

So this made me think I could just simply calculate the signed ranks of my outcome variable and run a simple linear mixed model.

My questions now are:

  • Can this method really be simply extended to linear mixed models?
  • Should you now regard the signed ranks formula as a type of transformation? Should, therefore, the residuals of your linear model on the signed ranks be assumed to be normally distributed? (I know non-parametric test don't have this assumption, but this method does allow you to look at the distribution of the residuals...).
  • Am I overlooking other very obvious solutions for nested non-normally distributed data?
  • $\begingroup$ do the predictors/covariates vary within subjects, or does each subject have a single value per covariate? (e.g. is something like 'subject 1 has X1="a", X2="b", and measurements of [1.2, 17.3, -2.5])' a good description of one subset of your data?) $\endgroup$ – Ben Bolker Sep 25 at 1:18
  • $\begingroup$ @Ben Bolker A subject can only be 1 out of two for X1, but has measurements for both categories of X2... To be more specific, X1 is a genotype, so a subject can only be one of the two genotypes and X2 is a testing condition and every subject is tested in both conditions. $\endgroup$ – RmyjuloR Sep 25 at 1:48

Linear models are often quite robust to non-Normality of the conditional distribution [CITATION NEEDED]. Since you have a single grouping variable (subjects), bootstrapping at the level of subjects would seem to be a reasonable way to get robust confidence intervals on your estimates. Alternatively, randomizing the assignment of testing conditions within individuals would give you a reasonable null model for computing p-values that would be robust to distributional assumptions.

  • $\begingroup$ Thank you for your suggestions! This is certainly very helpful! I also posted this question on Twitter directed to Jonas Lindeløv - he replied: "If you have few response options, ordinal regression is a good general-purpose solution which builds on linear models." Although, my outcome is continuous, so "very few response options" does not really hold I think? $\endgroup$ – RmyjuloR Sep 25 at 14:12
  • $\begingroup$ yes - I would say ordinal models would make sense if you had (say) <= 10 distinct response values. Maybe <= 20 for a big data set. $\endgroup$ – Ben Bolker Sep 25 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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