Clear Filters
Clear Filters

Using fit, which coefficients should I extract to assess differences?

2 views (last 30 days)
Hello, my apologies if this is basic in some way, I'm not super MATLAB savvy, but I'm trying to analyze some data from an experiment I recently conducted. I'm trying to determine differences in the rate that people adapt to something while they perform an obstacle course. There are two groups (g1 and g2), and three sessions (s1, s2, s3). My primary outcome metric is how quickly they perform the course (CT), but I'm really trying to see if g1 or g2 gets to a plateau level quicker (for example, does one group "bottom out" at trial 4, where as the other is at trial 8, example kind of below).
To do this, I have a different CSV for each group, at each session (6 total). I fit each individually (include is to deal with NaN):
[fobj G] = fit(Trial(include),Completion_Time(include),'exp2')
Exp2 fits the general data better than exp1, as this not a totally linear relationship. Receiving:
General model Exp2:
fobj(x) = a*exp(b*x) + c*exp(d*x)
Coefficients (with 95% confidence bounds):
a = 96.57 (-277.2, 470.3)
b = -1.221 (-3.167, 0.7264)
c = 41.35 (37.85, 44.85)
d = -0.01637 (-0.02216, -0.01058)
My primary question then, is what do I extract from this to run LMEs or an ANOVA to assess group differences? Is there a way that I can fit multiple models in one 'fit'? As in, compare G1 and G2 with fit? Or is there a different way entirely I should interpret this to compare between groups (in this sort of manner, I'm already using LME's on raw performance variables)? My initial thought is to take whicever coefficient describes "rate" and compare them between groups, but I'm struggling to understand the coefficients in this case.
Below is fitted model for G1 at S1, and based on the data this appears to fit well. The first trials is quite difficult, but they should adapt pretty rapidly before generally leveling out.

Accepted Answer

Star Strider
Star Strider on 28 Nov 2023
Only ‘c’ and ‘d’ are signifiantly different from zero, since the confidence limits of ‘a’ and ‘b’ include zero (the confidence limits have opposite signs, and so those paramters are actually not required in the regression).
I would change the model to provide for a y-offset:
f(x,a,b,c) = a * exp(b*x) + c
and then see how well that accounts for the data.
I believe that all those parameters would be significant, although I cannot say for certain.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!