R语言如何使用segmented包求拐点?

R语言如何使用segmented包求拐点


ibeautiful
浏览 5420回答 1
1回答

慕森卡

可以查看segmented包求拐点的例子。R中运行:library(segmented)?segmented。。。。。。#An example using the default method:# Cox regression with a segmented relationship &nbsp;## Not run:&nbsp;library(survival)data(stanford2)o<-coxph(Surv(time, status)~age, data=stanford2)os<-segmented(o, ~age, psi=40) #estimate the breakpoint in the age effectsummary(os) #actually it means summary.coxph(os)plot(os) #it does not workplot.segmented(os) #call explicitly plot.segmented() to plot the fitted piecewise lines如图,拐点已求出。
打开App,查看更多内容
随时随地看视频慕课网APP