亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

R語言如何使用segmented包求拐點?

R語言如何使用segmented包求拐點?

ibeautiful 2019-02-07 11:07:27
R語言如何使用segmented包求拐點
查看完整描述

1 回答

?
慕森卡

TA貢獻1806條經驗 獲得超8個贊

可以查看segmented包求拐點的例子。

R中運行:

library(segmented)

?segmented

。。。。。。

#An example using the default method:

# Cox regression with a segmented relationship  
## Not run: 

library(survival)


data(stanford2)

o<-coxph(Surv(time, status)~age, data=stanford2)

os<-segmented(o, ~age, psi=40) #estimate the breakpoint in the age effect

summary(os) #actually it means summary.coxph(os)

plot(os) #it does not work

plot.segmented(os) #call explicitly plot.segmented() to plot the fitted piecewise lines

如圖,拐點已求出。


查看完整回答
反對 回復 2019-03-07
  • 1 回答
  • 0 關注
  • 5994 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號