I have a data that looks smth like this:
Patient | Side | X | Y | Z
--------------------------------------
1 | Left | 1.3 | 0.5 | 3 |
----------------------------------+
1 | Left | 1.2 | 0.6 | 3.14|
----------------------------------+
1 | Right | 1.3 | 0.5 | 4.5 |
----------------------------------+
1 | Right | 1.4 | 0.4 | 31 |
----------------------------------+
2 | Left | 1.3 | 0.5 | 3 |
----------------------------------+
2 | Left | 1.3 | 0.5 | 3 |
----------------------------------+
2 | Right | 1.3 | 0.5 | 3 |
----------------------------------+
Where Patient in patient identifier, Side is side identifier and X,Y,Z... are factors (all of them are continuous). Generally, I want to determine what factors differs significantly in left-right sides. However, I cannot use simple tests or linear models because most of the data is dependent (one patient have multiple observations for each side). At this moment I just grouped the data by patients, computed the mean for each of it and performed a two-sided related t-test. But I assume that it is not the best nor good choice.
May you advice a better solution?