简体   繁体   English

如何拟合曲线并确定给定测量数据的渐近线

[英]How to fit a curve and determine the asymptote given measured data

I have measured photosynthetic rates at increasing light intensities to produce a PI curve for individual samples.我已经在增加光强度时测量了光合速率,以生成单个样品的 PI 曲线。 I want to determine the asymptote of each curve by fitting a model to the measured responses for each sample.我想通过将 model 拟合到每个样本的测量响应来确定每条曲线的渐近线。 Below is a subset of the dataframe where O2_229, O2_35, etc. are individual samples.下面是 dataframe 的子集,其中 O2_229、O2_35 等是单个样本。

A <- structure(list(LightIntensity = c(0, 112, 180, 272, 351, 430, 
482, 541, 609), O2_229 = c(-0.44673102313958, 0.0205958989967557, 
0.475351137678564, 0.640026082127451, 0.753504162148724, 
0.804818094545302, 0.84640533715284, 0.864374368585184, 
0.905709184251358), O2_35 = c(-0.302567249367208, 
0.181032510348939, 0.376659543810537, 0.496560233238315, 
0.540322247837853, 0.521608765794946, 0.528669387756481, 
0.516887809093099, 0.514844068198885), 
O2_230 = c(-0.542179874878379, 0.110661210104475, 
0.331450283334161, 0.568762984387555, 0.752938666550757, 
0.88143509214304, 0.945109493908027, 1.04005672006219, 
1.10246315337637), O2_36 = c(-0.510663216304597, 
0.509412237512078, 0.888867356301998, 1.18011410170533, 
1.28838854392113, 1.21645059640005, 1.29459817366225, 
1.02604605624222, 0.620845429599006), 
O2_Blank = c(-0.0291830039468955, -0.010410546520055, 
0.0414968296661793, 0.0398063330176891, -0.00945808361433628, 
-0.039882102158536, -0.0447402714742525, -0.0283811043764061, 
-0.0365212803552079)), row.names = c(NA, -9L), class = 
"data.frame")

Here is what I have so far to compare models for a single sample (O2_229).到目前为止,这是我比较单个样本(O2_229)的模型的内容。 I'm now trying to make sure I find the best model and determine the asymptote of each sample's curve.我现在试图确保找到最好的 model 并确定每个样本曲线的渐近线。

A <- Data_9.20
linear.model <-lm(O2_229 ~ LightIntensity, A)
summary(linear.model)
plot(A$LightIntensity, A$O2_229)
abline(lm(O2_229 ~ LightIntensity, A))

light2 <- A$LightIntensity^2
quadratic.model <-lm(O2_229 ~ LightIntensity + light2, A)
summary(quadratic.model)
lightvalues <- seq(0, 700, 100)
predictedcounts <- 
predict(quadratic.model,list(LightIntensity=lightvalues, light2 = 
lightvalues^2)) 
plot(A$LightIntensity, A$O2_229)
lines(lightvalues, predictedcounts)

I see that you are using a quadratic equation to model the data, which does not have an explicit asymptote.我看到您正在使用二次方程来 model 数据,它没有明确的渐近线。 I found that a Standard Geometric With Offset equation "y = a * pow(x, (b*x)) + Offset" appears to be a good model for the data, with the advantage that the "Offset" parameter is the explicit fitted asymptote.我发现带有偏移方程“y = a * pow(x, (b*x)) + Offset”的标准几何对于数据来说似乎是一个很好的 model,其优点是“偏移”参数是显式拟合的渐近线。 Here are my fitted values for the various data sets (except O2_Blank) and model plots.这是我对各种数据集(O2_Blank 除外)和 model 图的拟合值。 I note that data set 02_36 seems to curve down rather than approach an asymptote.我注意到数据集 02_36 似乎是向下弯曲而不是接近渐近线。

data set O2_229:
a = -1.3851681272467806E+00
b = -1.0364478100088784E-03
Offset =  9.1626307846861987E-01

情节229

data set O2_35:
a = -8.4182899434390634E-01
b = -1.7580233358644494E-03
Offset =  5.3416172364897729E-01

情节35

data set O2_230:
a = -1.6587794258648598E+00
b = -7.2532639452267352E-04
Offset =  1.1581944009325142E+00

情节230

data set O2_36:
a = -1.6368370242440751E+00
b = -2.1647786145736897E-03
Offset =  1.1086452557429154E+00

情节36

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM