0
$\begingroup$

I have a sigmoid function

cycles = seq(1,21)
fluorescence = c(33.41491, 33.41534, 33.42511, 33.49943, 33.701, 33.8777, 33.95081, 33.97527, 33.98374, 33.98695, 33.98827, 33.98886, 33.98914, 33.98928, 33.98936, 33.9894, 33.98942, 33.98944, 33.98945, 33.98945, 33.98946)

And I wonder if there's a reproducible way of defining at which cycle the plateau phase of this function is reached?

$\endgroup$
1
  • 1
    $\begingroup$ The data haven't yet reached a plateau. $\endgroup$
    – whuber
    Sep 4, 2022 at 15:22

1 Answer 1

0
$\begingroup$

Usually sigmoid functions will have horizontal asymptotes, and so will never actually "plateau". Any place you locate the beginning of the plateau will be arbitrary.

But you might be able to define an arbitrary definition of "plateau" that makes sense for your specific case. For example you could say the plateau begins between cycle 6 and 7 since fluorescence increases < 0.1 units at that point.

If you want to statistically locate the beginning of the plateau, you could use a segmented model, like a quadratic plateau model. Below I have R code for this. In this case, the model fit isn't perfect, and I could see some theoretical objections to fitting this model to this data. The predicted break point (clx) is 7.86, and you can get a confidence interval for this value.

### Adapted from: https://rcompanion.org/handbook/I_11.html

if(!require(nlstools)){install.packages("nlstools")}
if(!require(rcompanion)){install.packages("rcompanion")}

cycles = seq(1,21)
fluorescence = c(33.41491, 33.41534, 33.42511, 33.49943, 33.701, 33.8777, 33.95081, 33.97527, 33.98374, 33.98695, 33.98827, 33.98886, 33.98914, 33.98928, 33.98936, 33.9894, 33.98942, 33.98944, 33.98945, 33.98945, 33.98946)

plot(fluorescence ~ cycles)

Data = data.frame(Cycles = cycles[5:21], Fluorescence = fluorescence[5:21])

a.ini     = 0
b.ini     = 1
clx.ini   = 15

quadplat = function(x, a, b, clx) {
  ifelse(x  < clx, a + b * x + (-0.5*b/clx) * x * x,
         a + b * clx + (-0.5*b/clx) * clx * clx)}

model = nls(Fluorescence ~ quadplat(Cycles, a, b, clx),
            data = Data,
            start = list(a   = a.ini,
                         b   = b.ini,
                         clx = clx.ini),
            trace = FALSE,
            nls.control(maxiter = 1000))

summary(model)

library(nlstools)

Boot = nlsBoot(model)

summary(Boot)

library(rcompanion)

plotPredy(data  = Data,
          x     = Cycles,
          y     = Fluorescence,
          model = model,
          xlab  = "Cycles",
          ylab  = "Fluorescence")

hist(resid(model))

plot(resid(model) ~ predict(model))

plot(resid(model) ~ Data$Cycle)

   ### Parameters:
   ###     Estimate  Std. Error  t value  Pr(>|t|)    
   ### a   31.85041     0.11334   281.01   < 2e-16 ***
   ### b    0.54367     0.03531    15.40  3.59e-10 ***
   ### clx  7.86128     0.09971    78.84   < 2e-16 ***
   ### 
   ### Median of bootstrap estimates and percentile confidence intervals
   ###        Median        2.5%       97.5%
   ### a   31.844684  31.6439560  32.0483756
   ### b    0.545735   0.4818207   0.6057807
   ### clx  7.850955   7.7046871   8.0511236

enter image description here

$\endgroup$
1
  • $\begingroup$ P.S. If you use the quadratic plateau model in this case, I would probably include one more data point, e.g. Data = data.frame(Cycles = cycles[4:21], Fluorescence = fluorescence[4:21]) $\endgroup$ Sep 4, 2022 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.