cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
GCardin
Level I

Is it possible to run multiple univariate Cox survival analysis in one step in JMP ?

I am trying to test multiple variables in independant univariate Cox survival analysis (with years of survival and years of follow-up censor). Is there a way to run multiple variables at once but to have an independant univariate Cox analysis instead of a multivariate analysis ? I have a lot of variables I'd like to test and would prefer not having to clock them all one by one.

Is there a script I should use ?

Thanks !

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Is it possible to run multiple univariate Cox survival analysis in one step in JMP ?

Hello @GCardin ,

What kind of information do you want to get from the univariate Cox survival analysis report?
If you want to get all p-values of effect likelihood ratio tests, one idea is to use column switcher and jsl.
1. Fit the proportional hazards model and set the column switcher from the red triangle.

2023-09-04 143801.png

 

2. Write the following code in the scripting window and edit line 9 in the script. 

rpt = Current Report();
colswitcher_obj = rpt[ColumnSwitcherCOntextOutlinebox( 1 )] << get scriptable object;
colswitch_list = colswitcher_obj << get list;

/* Loop through each column in the colswitch_list */
For( i = 1, i <= N Items( colswitch_list ), i++, 

	/* Change here */
	dt1 = rpt[Outline Box( "Effect Likelihood Ratio Tests" )][Table Box( 1 )] <<
	make combined data table;

	/* Concatenate the tables */
	If( i == 1,
		main_tb = dt1;
		main_tb << Set Name( "All" );
	,
		Try( main_tb << Concatenate( dt1, Append to First Table ) );
		Close( dt1, No Save );
	);

   /* Close temporary tables and switch next column */
	colSwitcher_obj << Next;
);


3. Run the script from the Edit menu.
You can get data table containing information for p-values.

I hope it helps.

View solution in original post

1 REPLY 1

Re: Is it possible to run multiple univariate Cox survival analysis in one step in JMP ?

Hello @GCardin ,

What kind of information do you want to get from the univariate Cox survival analysis report?
If you want to get all p-values of effect likelihood ratio tests, one idea is to use column switcher and jsl.
1. Fit the proportional hazards model and set the column switcher from the red triangle.

2023-09-04 143801.png

 

2. Write the following code in the scripting window and edit line 9 in the script. 

rpt = Current Report();
colswitcher_obj = rpt[ColumnSwitcherCOntextOutlinebox( 1 )] << get scriptable object;
colswitch_list = colswitcher_obj << get list;

/* Loop through each column in the colswitch_list */
For( i = 1, i <= N Items( colswitch_list ), i++, 

	/* Change here */
	dt1 = rpt[Outline Box( "Effect Likelihood Ratio Tests" )][Table Box( 1 )] <<
	make combined data table;

	/* Concatenate the tables */
	If( i == 1,
		main_tb = dt1;
		main_tb << Set Name( "All" );
	,
		Try( main_tb << Concatenate( dt1, Append to First Table ) );
		Close( dt1, No Save );
	);

   /* Close temporary tables and switch next column */
	colSwitcher_obj << Next;
);


3. Run the script from the Edit menu.
You can get data table containing information for p-values.

I hope it helps.