我们有一个高级用户建议添加Nomogram、DCA决策曲线和NRI在预测建模中。 这些函数现在由 R 使用,用户也希望在 JMP 中使用它们,尤其是医疗用户。
我刚刚被问及如何制作诺模图,所以很高兴在愿望清单中看到它。 该客户是 Poseida,他们拥有 JMP、JMP Pro、JMP Clinical 和 JMP Live 的许可。
@mia_stephens
嗨米娅
感谢您关注我的建议。
我已经要求 SE 通过将 JMP 与 R 相结合来编写插件程序。JSL如下:
// Expressions List
LoadExprs = expr(
InitR = expr(
R Init();
R Submit( "
library(survival)
library(rms)
" );
);
MakeNomoPlot = expr(
yy = yvar << Get Items;
cc = cvar << Get Items;
xx = xvar << Get Items;
R send(yy);
R send(cc);
R send(xx);
dt = Current Data Table();
R Send(dt);
R Submit(
EvalInsert("\[
dd<-datadist(dt)
options(datadist="dd")
t1 <- yy[1]
t2 <- cc[1]
t3 <- paste(xx, collapse = "+")
formula=eval(parse(text=paste("Surv(",t1,",",t2,")~",t3)))
f<-cph(formula,data=lung,x=TRUE,y=TRUE,surv=TRUE)
survival<-Survival(f)
survival1<-function(x)survival(365,x)
survival2<-function(x)survival(730,x)
nom<-nomogram(f,fun=list(survival1,survival2),
fun.at=c(0.05,seq(0.1,0.9,by=0.05),0.95),
funlabel=c('1 year survival','2 year survival'))
plot(nom)
]\"));
);
CapturePlot = expr(
JMP_plot = R Get Graphics(png);
New Window("Imported Plot", Picture Box(JMP_Plot));
);
RunClose = expr(
inwin << Close Window; // close window
R Term( ); //Close r connection
);
);
LoadExprs; //load all the expressions that reside at the end of the file
InitR; //Start R Connection and load libraries
// Prompt for data table if none is open
if(IsEmpty(Current Data Table()), dt = Open(), dt = Current Data Table());
//Draw Window and Create Fields and Buttons
inwin = New Window( //Draw New Window and name inwin
"列线图", //Window Title
Panel Box("选择列", //Draws visible box
H List Box( //Invisible box for layout - glues horizontally
clb1 = Col List Box( all ), //Column listbox, with name clb1 so we can access later
// Draw First Lineup Box (invisible, provides arrangement) for Selecting Columns
Lineup Box( N Col( 2 ), //with 2 columns indicated, each pair will span a row
//First Row
Button Box( "Y,事件时间", yvar << setitems( clb1 << getselected ) ),
yvar = Col List Box( minitems( 1 ), maxitems( 1 ), nlines( 1 ) ),
//Second Row
Button Box( "删失", cvar << setitems( clb1 << getselected ) ),
cvar = Col List Box( minitems( 1 ), maxitems( 1 ), nlines( 1 ) ),
//Third Row
Button Box( "X,因子", xvar << setitems( clb1 << Get Selected ) ),
xvar = Col List Box( minitems( 1 ), maxitems( 100 ), nlines( 10 ) ),
),
// Draw Second Lineup Box for Buttons
Lineup Box( N Col( 1 ),
Button Box("确定", MakeNomoPlot),
Button Box("在JMP窗口中显示", CapturePlot),
Button Box("关闭", RunClose )
) //close Lineup Box
) //close H List Box
) //close Panel box
); //close New Window感谢您的信息。@克莱尔, 是否有可以共享的脚本或加载项?
这是我发现的维基百科.我认为此链接也描述了它的用途。 那是对的吗@克莱尔
嗨米娅
Nomogram、DCA决策曲线和NRI由我们医院的高级 JMP 用户提议作为预测建模的高级和新功能。 他在医院里教医生如何使用 JMP。 这些新福目前可以在 R 中完成功能。
这次我将首先分享列线图。
列线图常用于医学研究和论文中,深受医学工作者的欢迎。
几个月前我在医院的医生中做了一个调查。 几乎 80-90% 的医生需要在论文中使用列线图。 我请china SE用JMP和R编写JSL,分享给客户。 但是客户还是想直接用JMP来做。
如果我们可以将列线图添加到 JMP 中,JMP 将在这些医务人员中更具竞争力。

你能提供更多细节吗? 参考链接、其他请求的链接(如果可用)、示例、屏幕截图...
谢谢!