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灯, 水草

请输入看板名称,例如:iOS站内搜寻

TOP