GLME: how to deal with random effects when comparing data of different subjects


New Member
Hi everyone, happy to be onboard! I'm working on a master thesis project and I have a doubt regarding the statistical test I'm using, the Generalized Linear Mixed Model (GLME).

I have 15 subjects that perform the same movement with left (abbreviated as LH) and right (RH) hand. I recorded the EMG activity and, long story short, have now a EMG-derivated data structure (called synergy) for each hand of each subject. Thus I have 30 synergies in total, 15 for each hand.
I have to test these synergies for similarity, comparing left and right hands. I have two types of tests:
1) Similarity Between Hands (SBH): compare synergies of left and right hand of the same subject (so one SBH test per subject is possible, thus 15 SBH values);
2) Similarity Across Subjects (SAS): compare synergies of a given hand of a subject with the synergies of the same hand of the other subjects (each subject can be tested against 14 different subjects, but with no repetition, so 14+13+12+...+2+1=105 SAS values).

My supervisor suggested to use the GLME test to investigate differences in the similarity between the two types of tests and adding as effect the handedness. Just to be more pragmatic, I'm using Matlab, so my data are arranged in a table: the first column is the concatenation of all the results, SBH and SAS; the other columns contain categorical values to specify the hand and the subject. Below is a schematic representation of the table, the colored column on the right is just to simplify the reading to see easily how the data are organized:

Now, to perform a GLME test I have to specify fixed and random effects. To my (very limited) knowledge, handedness would be a fixed effect, while the subject index a random one, as it expresses the inter-personal variability. Problem is, due to the different definition of the two tests, the subject index assumes two different types of values: for SBH is a univocal value, related to a single subject, while for SAS is related to a couple of indexes. Should I add here the levels regarding each couple? but even so, is it still safe to consider it a random effect as it is for the SBH values?
Maybe is a dumb question and I got too many things wrong, but I'd really appreciate an helping hand here, as my supervisor himself said he doesn't know the answer.

Thank you in advance!