Statistics 板


LINE

[軟體程式類別]: SAS [程式問題]: 門檻回歸分析 threshold regression [軟體熟悉度]: 低(1~3個月) [問題敘述]: 最近幫老師整理資料需要用到門檻回歸,但網路上找的到的SAS語法只有 TR-software-20061224 這個範例,他有用到虛擬變數的寫法,但我的資料沒有 想請問要怎麼改成一般變數的門檻回歸 我要跑的資料形式是這樣 y=a+b1*X1(f<r)+b2*X1(f>r)+b3*X2+b4*X3+b5*X4+b6*X5+e [程式範例]:找到附上程式範例 data myeloma; input id time age gender treat fail; datalines; 1 3.657 53 1 2 1 2 3.175 47 0 0 0 3 3.09 50 1 1 1 4 3.288 55 1 2 1 5 2.579 31 1 1 0 6 3.52 63 1 0 1 7 2.912 62 0 0 1 8 3.458 45 0 0 1 9 3.175 58 1 1 1 10 4.224 59 1 1 1 11 4.23 62 1 2 1 12 3.626 52 1 0 1 13 3.78 51 0 1 1 14 4.053 48 0 0 1 15 3.77 59 0 2 1 16 3.515 40 0 2 1 17 4.224 56 1 2 1 18 3.458 67 0 2 1 19 3.349 66 1 0 1 20 4.45 50 1 1 1 21 3.486 59 0 0 1 22 3.288 60 1 1 1 23 3.827 64 1 1 1 24 2.608 56 0 2 1 25 2.069 64 0 2 1 26 4.269 47 1 2 0 27 3.402 52 0 2 1 28 4.195 46 0 0 1 29 3.628 51 1 0 1 30 2.919 61 1 1 1 31 3.855 43 1 1 1 32 3.628 50 0 0 1 33 4.053 30 1 1 1 34 2.962 68 0 0 1 35 2.948 53 1 0 1 36 2.834 58 1 0 1 37 2.948 51 1 1 0 38 3.061 37 1 1 0 39 3.203 59 1 2 1 40 4.28 49 1 1 0 41 2.551 64 0 4 1 42 3.175 39 1 0 0 43 3.288 65 0 1 1 44 3.674 54 1 0 1 45 4.082 37 0 1 0 46 3.061 53 1 0 1 47 3.033 57 0 0 1 48 3.203 55 1 1 1 49 3.379 59 1 2 1 ; run; data par1(type=est); keep _type_ b0 b1 b2 b3 g0 g1 g2 g3; _type_='parms'; b0=1; b1=0; b2=0; b3=0; g0=1; g1=0; g2=0; g3=0; output; run; ods rtf file='myeloma.rtf'; ods html file='myeloma.html' headtext='<link rel=alternate media=print href="myeloma.rtf">'; proc nlp data=myeloma tech=NEWRAP inest=par1 outest=opar1 outmodel=mode1 cov=2 pcov phes pshort; max logf; parms b0 b1 b2 b3 g0 g1 g2 g3; lnx0=b1*age+b2*gender+b3*treat+b0; mu=g1*age+g2*gender+g3*treat+g0; d=-mu/exp(lnx0); v=exp(-2*lnx0); PI=constant('pi'); s=fail*(-0.5*(log(2*PI*v*(time**3))+(d*time-1)**2/(v*time)))+(1-fail)*log(probnorm((1-d*time)/sqrt(v*time))-exp(2*d/v)*probnorm(-(1+d*time)/sqrt(v*time))); logf=s; run; ods _all_ close ; ----------------------------------------------------------------------------- 非常感謝,另外想請問有無這方面的程式書籍可以推薦 謝謝 --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 134.208.96.238
2F:→ BugEater:59679/HTML/default/viewer.htm#nlp_sect1.htm 11/13 05:57
3F:推 l19790824:小黑~我在這裡0.0/ 11/13 17:00







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:BabyMother站內搜尋

TOP