0

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

我想找到创建黑色分段线的方程式并找到关节点(红色)。请看看我该怎么做。任何帮助深表感谢。在此处输入图像描述

4

1 回答 1

1

o.seg tells you everything you want to know. "Estimated Break-Point(s):" tells you the x-value (GDD value) of the breakpoint (red point). It is psi1.GDD = 391.3.

o.seg$coefficients tells you the line equation, which is roughly -2.14 + 0.0097*GDD*(GDD < psi1.GDD) + 0.12*GDD*(GDD >= psi1.GDD).

于 2017-11-14T20:16:54.930 回答