Predictive value of X for a change in Y?

Hi everyone,

R question:
10 participants underwent a weight loss programme, like so:


I wonder if IQ predicts weight loss success.

I should not compute the delta, i.e.
since heavier people have more potential to lose weight, and results would be biased. It also fails due to many missings.

One idea is to compute and use the person-specific coefficients, i.e.
which, however, still is related to baseline weight. Further, adding the baseline weight to a regression model is discouraged in literature.

I am looking to give it a new try with random intercepts, but sadly I do not quite understand how to code this in R. Does anyone know of code to run such an analysis? Any help would be greatly appreciated!!

Kindest regards.