我們有一個高級用戶建議添加添加Nomogram,DCA決策曲線,NRI在預測建模中。 這些功能現在由 R 使用,用戶也希望在 JMP 中使用它們,尤其是醫療用戶。
@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 將在這些醫務人員中變得更具競爭力。

你能提供更多細節嗎? 參考鏈接、其他請求的鏈接(如果有)、示例、屏幕截圖、...
謝謝!