plotting lrc in SSasymp in R

2019-08-24 19:55发布

问题:

My question is similar to the unanswered here: working with SSasymp in r

For a simple SSmicmen:

x1 = seq (0,10,1)
y1 = SSmicmen(x1, Vm=10, K=0.5)
plot(y1 ~ x1, type="l")

the value of K is easily identified in the point (5, 0.5), the value of half the maximum growth.

Given a simple SSasympOrig:

x2 = seq (0,10,1)
y2 = SSasympOrig(x2, Asym=10, lrc=0.1)
# Asym*(1 - exp(-exp(lrc)*input))
plot(y2 ~ x2, type="l")

is there a way to represent and/or identify the meaning and/or effect of the parameter "lcr" on the resulting graph, in a similar way as the example above?

回答1:

Sure, you can visualize this:

x2 = seq (0,10,0.01)

y2 = SSasympOrig(x2, Asym=10, lrc=0.1)
# Asym*(1 - exp(-exp(lrc)*input))
plot(y2 ~ x2, type="n")

for (lrc in (10^((-5):1))) {
  y2 = SSasympOrig(x2, Asym=10, lrc=lrc)
  # Asym*(1 - exp(-exp(lrc)*input))
  lines(y2 ~ x2, type="l", col = 6+log10(lrc))
}

This parameter controls how fast the asymptote is approached. Getting this from studying the equation requires highschool-level maths skills. Or you could try reading the Wikipedia entry about the half-life:

y2 = SSasympOrig(x2, Asym=10, lrc=0.1)
# Asym*(1 - exp(-exp(lrc)*input))
plot(y2 ~ x2, type="l")

points(x = log(2) / exp(0.1), y = 0.5 * 10)