我发现这个例子对RDocumentation很有帮助,我想进一步探索它。以下代码改编自https://www.rdocumentation.org/packages/segmented/versions/0.5-2.1/topics/plot.segmented
GDD<- c(221.2765957446810000,
309.2198581560280000,
431.2056737588650000,
483.6879432624110000,
553.1914893617020000)
biom<-c(0.0000000001000000,
0.8510638297872340,
5.9574468085106400,
15.3191489361702000,
22.1276595744681000)
o<- glm(biom~GDD, family = gaussian); o
o.seg<-segmented(o, ~GDD) #single segmented covariate and one breakpoint:'psi' can be omitted
par(mfrow=c(2,1))
plot(o.seg, conf.level=0.95, shade=TRUE)
points(o.seg, link=FALSE, col=2)
答案 0 :(得分:1)
o.seg
告诉你你想知道的一切。 “Estimated Break-Point(s):”告诉您断点的红外线(GDD值)(红点)。它是psi1.GDD
= 391.3。
o.seg$coefficients
告诉您线方程,大致为-2.14 + 0.0097*GDD*(GDD < psi1.GDD) + 0.12*GDD*(GDD >= psi1.GDD)
。