【发布时间】:2015-09-13 02:32:17
【问题描述】:
我正在评估一个医疗保健决策模型,并希望显示双向敏感性分析的结果。我已经包含了为两个感兴趣的变量及其线性预测变量(生命天数)创建范围的代码。
我希望红色和蓝色区域带有阴影,而不是点。我在twoway 中尝试了rarea 和area 命令,但这并没有达到预期的效果。下面编码的散点图是我能达到的最终结果的最佳近似值。
*create all possible pairs of data
clear
set obs 40
gen a = 0.20 if [_n] == 1
replace a = a[_n-1] - 0.02 if [_n] != 1
gen b = a
fillin a b
*predict estimates from equation
gen pred = a*-1067.54 + b*-89.1
*identify all estimates >= 90 days
gen _90 = pred >= 90
*plot predictions by status of exceeding 89 days
twoway scatter a b if _90 == 1 || scatter a b if _90 == 0
提前感谢您的帮助。
【问题讨论】: