cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
sanqub
Level III

How to rearrange tables/results in JMP distribution and ultimately create an application in JSL?

Dear All,

Suppose, I have two data sets. I am using standard example Sample library>> Big Class.jmp.

Data set 1: All the 40 students of a class.

Data set 2: Subset of just female students of the the class.

Need: I would like to compare distribution of [age,sex,height,weight] for Dataset 1 and 2.

For this I open both the reports, combine these reports using JMP>file> application. When I combine applications the distribution of age,sex,height,weight are in single window.

But I want in a form age(data set1) and age(data set 2) side by side and in same scale. then height(data set1) and height(data set 2) side by side and in same scale and so on for all other parameters in a single window.

My actual data sets are quiet large and it would be quiet useful when a parameter of data set1 and data set2 are side by side for easier comparison. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to rearrange tables/results in JMP distribution and ultimately create an application in JSL?

here is a scripting example that gives the results you want

Names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
dt2=open("$SAMPLE_DATA/big class families.jmp");

column list = dt << get column names;

New Window( "Side by Side",
	H List Box(
		For( i = 1, i <= N Items( column list ), i++,
			dt << Distribution( Column( column list[i] ) );
			dt2 << Distribution( Column( column list[i] ) );
		)
	)
);
Jim

View solution in original post

6 REPLIES 6

Re: How to rearrange tables/results in JMP distribution and ultimately create an application in JSL?

Ultimately you will need all of the data set 1 and data set 2 observations in the same data table. If they start out as separate data tables, then use Tables > Concatenate to bring them together. Make sure that the common variables use the same column names first. Also, make sure that there is a column to indicate membership (i.e., data set 1 or data set 2). If they are already together, then you only need the column for membership. The membership column should use the nominal modeling type.

The Distribution platform freatures should support what you want to do. Select all of the respoinse columns and assign them to Y. Select the membership column and assign it to By role. Examine the red triangle menu: Stack will rearrange the order, Uniform Scaling will make the axes match. You can use the Ctrl-click feature with the red triangle to 'broadcast' the command.

sanqub
Level III

Re: How to rearrange tables/results in JMP distribution and ultimately create an application in JSL?

Hi Mark,

Thanks for your reply. I have already done it.

But I want the distribution table for a parameter for both data sets just side by side for comparison. {I have 60 input paramters}.

Please check a ppt, results I get by following steps you have mentioned and also what I actual need.

 

Thanks

 

San 

txnelson
Super User

Re: How to rearrange tables/results in JMP distribution and ultimately create an application in JSL?

here is a scripting example that gives the results you want

Names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
dt2=open("$SAMPLE_DATA/big class families.jmp");

column list = dt << get column names;

New Window( "Side by Side",
	H List Box(
		For( i = 1, i <= N Items( column list ), i++,
			dt << Distribution( Column( column list[i] ) );
			dt2 << Distribution( Column( column list[i] ) );
		)
	)
);
Jim
sanqub
Level III

Re: How to rearrange tables/results in JMP distribution and ultimately create an application in JSL?

Hi Txnelson,

 

Thanks alot.

Thats perfectly what I need. I was really struggling for this since 4days.

 I will try to write in similar fashion to my data sets.

 

Regards

 

San

sanqub
Level III

Re: How to rearrange tables/results in JMP distribution and ultimately create an application in JSL?

Is there a way I can have same scale for the side by side tables so obtained?
Thanks for your help.
txnelson
Super User

Re: How to rearrange tables/results in JMP distribution and ultimately create an application in JSL?

OK.....I just checked the date when you joined the community......and you have been online for over a year.........so you already know the answer to your question.......

 

This is JMP, and of course you can have the axes match. :)
all that needs to be done is to capture the axis settings from the first graph of the pair, and then copy them to the second graph. 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt2 = Open( "$SAMPLE_DATA/big class families.jmp" );

column list = dt << get column names;

New Window( "Side by Side",
	H List Box(
		For( i = 1, i <= N Items( column list ), i++,
			dis1 = dt << Distribution( Column( column list[i] ) );
			dis2 = dt2 << Distribution( Column( column list[i] ) );
			Report( dis1 )[Axis Box( 1 )] << copy axis settings;
			Report( dis2 )[Axis Box( 1 )] << paste Axis settings;
		)
	)
);
Jim