I am trying to compare changes over time in a physiologic variable between two groups of subjects. Each subject has at least two different measurements of this variable with days in between measurements. Subjects will not have the same interval between measurements. The attached graph shows that I'm able to create spaghetti plots for the two groups of subjects. I'm trying to compare lines of fit to see if the subject differ in terms of changes in this variable overtime. When I try to do a line of fit I get the second picture below? Trying to see if the slope differs between the two groups. Any help would be appreciated. Thanks.

