Comparing two sigmoideal curves. Seeking advice.

Discuss statistics related things
Post Reply
ajestudillo
Posts: 3
Joined: Fri May 01, 2020 2:43 pm

Comparing two sigmoideal curves. Seeking advice.

Post by ajestudillo »

Probably a very stupid stat question, but I am a bit lost and unsure of what to do! I have conducted a study testing whether two types of stimuli are processed differently. I have presented the two types of stimuli under different orientation conditions. As can be seen in the graph, both stimuli seem to have a very similar processing as both sigmoideal curves look very similar. My question is how can I test this? In other words, how can I test whether both sigmoideal curves are the same? Any help would be much appreciated!
Attachments
421275228_8088397494509221_1487076672054894766_n.jpg
421275228_8088397494509221_1487076672054894766_n.jpg (21.43 KiB) Viewed 1906 times
User avatar
reason180
Posts: 278
Joined: Mon Jul 24, 2017 4:56 pm

Re: Comparing two sigmoideal curves. Seeking advice.

Post by reason180 »

I think a rather complex approach would be to assume that each of the two functions is indeed sigmoidal, find and apply a transformation that appears to mostly linearize the functions, then use multiple regression to ascertain whether the slope for the orientation-by-stimulus interaction is significant.

I would be more convinced by a simpler approach that treats both orientation and stimulus as categorical variables. I would then do an Analysis of Variance to ascertain whether there's a significant orientation-by-stimulus interaction.
MattC
Posts: 5
Joined: Tue Jan 23, 2024 3:21 pm

Re: Comparing two sigmoideal curves. Seeking advice.

Post by MattC »

The suggestions from @reason180 are both good.

Using a two-way anova with interaction (response~stimulus+orientation+stimulus:orientation - assuming stimulus and orientation are both factors), the main effect for stimulus would provide a test for a difference in mean for the two level of stimulus, while the interaction effect would test for a difference in the "shape" of the response against orientation. You can simply ignore the main effect for condition. One possible issue with this approach is the slight change in variance from left to right, which may or may not be large enough to cause a problem with the p-values, and might also be associated with non-normality in the residuals. If you can find a linearising transformation, this may fix both of these possible issues. In your linear regression, you will fit the same model as for the anova, but this time stimulus will need to be a factor and orientation a numeric variable. Again, the interaction and the main effect for stimulus are of most interest.

If you still want to go down the sigmoidal curve route, you'll need to use a non-linear curve fitting function like nls() in R and specify an equation for your chosen curve. One option would be a 4-parameter logistic curve using something like: y=a+c/(1+b*exp(x-m)), where a=lower asymptote, c=upper asymptote, b=slope and m=midpoint. Once you have successfully fitted this curve to the whole data set, you can start testing for differences between the two levels of stimulus by adding more parameters. For example, in the model y=a+d*stim+c/(1+b*exp(x-m)), if stim is a 0/1 variable, then d represents a vertical shift between the two curves. If this parameter is significant, then you have demonstrated a difference. You can also include parameters that allow any of the other model parameters (e.g. slope) to vary between the two levels of stimulus. The same concerns about homogeneity of variance and normality apply.

Hope this helps.

P.S. Not a stupid question
MattC
Posts: 5
Joined: Tue Jan 23, 2024 3:21 pm

Re: Comparing two sigmoideal curves. Seeking advice.

Post by MattC »

Correction
The formulae for the two curves mentioned in my post should read:
y=a+c/(1+exp(-b*(x-m))) and
y=a+d*stim+c/(1+exp(-b*(x-m)))
Post Reply