我发现这个示例对 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)