2017-11-14 14 views
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) 

에서 적응했다. 제가 어떻게 할 수 있는지보십시오. 어떤 도움이라도 대단히 감사합니다. enter image description here

답변

1

o.seg은 알고 싶은 모든 것을 알려줍니다. "예상 중단 점 (들) :"은 중단 점 (빨간색 점)의 x 값 (GDD 값)을 알려줍니다. psi1.GDD = 391.3입니다.

o.seg$coefficients은 대략 -2.14 + 0.0097*GDD*(GDD < psi1.GDD) + 0.12*GDD*(GDD >= psi1.GDD) 인 회선 방정식을 알려줍니다.