cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
jnikkel
Level II

Bivarate Linear Fit of multiple Regressions - Scripting a Combined Data table from Parameter Estimates

I have been working on scripting some data analysis done in JMP with multiple tabulate, Y by X Bivarate Fit, and split table steps. I have been able to generate scripts for everything except step where I right click in a Parameter estimates TableBox from the Fit Group report and select 'Make Combined Data Table"

 

Any suggestions for how to accomplish this?

 

My Script language is here:

Names Default To Here( 1 );
dt = Open( "data file directory" );
obj = dt << Tabulate(
	Add Table(
		Column Table( Analysis Columns( :KT3, :Log Age, :k31, :N1 ), Statistics( Mean ) ),
		Row Table( Grouping Columns( :Batch No., :Age ) )
	)
);

obj << Make into Data Table;
New Window( "",
	V List Box(
		Fit Group(
			Bivariate(
				SendToByGroup( {:Batch No. == "By Variable 1"} ),
				SendToByGroup( {:Batch No. == "By Variable 1"}, Y( :Name( "Mean(KT3)" ) ) ),
				SendToByGroup(
					{:Batch No. == "By Variable 1", Platform Index( 2 )},
					Y( :Name( "Mean(k31)" ) )
				),
				SendToByGroup(
					{:Batch No. == "By Variable 1", Platform Index( 3 )},
					Y( :Name( "Mean(N1)" ) )
				),
				SendToByGroup( {:Batch No. == "By Variable 2"}, Y( :Name( "Mean(KT3)" ) ) ),
				SendToByGroup(
					{:Batch No. == "By Variable 2", Platform Index( 2 )},
					Y( :Name( "Mean(k31)" ) )
				),
				SendToByGroup(
					{:Batch No. == "By Variable 2", Platform Index( 3 )},
					Y( :Name( "Mean(N1)" ) )
				),
				SendToByGroup( {:Batch No. == "By Variable 3"}, Y( :Name( "Mean(KT3)" ) ) ),
				SendToByGroup(
					{:Batch No. == "By Variable 3", Platform Index( 2 )},
					Y( :Name( "Mean(k31)" ) )
				),
				SendToByGroup(
					{:Batch No. == "By Variable 3", Platform Index( 3 )},
					Y( :Name( "Mean(N1)" ) )
				),
				SendToByGroup( {:Batch No. == "By Variable 4"}, Y( :Name( "Mean(KT3)" ) ) ),
				SendToByGroup(
					{:Batch No. == "By Variable 4", Platform Index( 2 )},
					Y( :Name( "Mean(k31)" ) )
				),
				SendToByGroup(
					{:Batch No. == "By Variable 4", Platform Index( 3 )},
					Y( :Name( "Mean(N1)" ) )
				),
				SendToByGroup( {:Batch No. == "By Variable 5"}, Y( :Name( "Mean(KT3)" ) ) ),
				SendToByGroup(
					{:Batch No. == "By Variable 5", Platform Index( 2 )},
					Y( :Name( "Mean(k31)" ) )
				),
				SendToByGroup(
					{:Batch No. == "By Variable 5", Platform Index( 3 )},
					Y( :Name( "Mean(N1)" ) )
				),
				SendToByGroup( {:Batch No. == "By Variable 6"}, Y( :Name( "Mean(KT3)" ) ) ),
				SendToByGroup(
					{:Batch No. == "By Variable 6", Platform Index( 2 )},
					Y( :Name( "Mean(k31)" ) )
				),
				SendToByGroup(
					{:Batch No. == "By Variable 6", Platform Index( 3 )},
					Y( :Name( "Mean(N1)" ) )
				),
				SendToByGroup( {:Batch No. == "By Variable 7"}, Y( :Name( "Mean(KT3)" ) ) ),
				SendToByGroup(
					{:Batch No. == "By Variable 7", Platform Index( 2 )},
					Y( :Name( "Mean(k31)" ) )
				),
				SendToByGroup(
					{:Batch No. == "By Variable 7", Platform Index( 3 )},
					Y( :Name( "Mean(N1)" ) )
				),
				SendToByGroup( {:Batch No. == "By Variable 8"}, Y( :Name( "Mean(KT3)" ) ) ),
				SendToByGroup(
					{:Batch No. == "By Variable 8", Platform Index( 2 )},
					Y( :Name( "Mean(k31)" ) )
				),
				SendToByGroup(
					{:Batch No. == "By Variable 8", Platform Index( 3 )},
					Y( :Name( "Mean(N1)" ) )
				),
				X( :Name( "Mean(Log Age)" ) ),
				Fit Line( {Line Color( {212, 73, 88} )} ),
				By( :Batch No. )
			)
		)
	)
);
Report( Fit Group[1] )["Parameter Estimates"][Table Box( 3 )] << Make Combined Data Table;
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Bivarate Linear Fit of multiple Regressions - Scripting a Combined Data table from Parameter Estimates

To get what you want, change 

Bivariate(

to

Biv = Bivariate(

and change

Report ( Fit Group[1] ) ["Parameter Estimates"][Table Box( 3)] << Make Combined Data Table;

to

Report ( Biv[1] ) ["Parameter Estimates"][Table Box( 1)] << Make Combined Data Table;
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Bivarate Linear Fit of multiple Regressions - Scripting a Combined Data table from Parameter Estimates

To get what you want, change 

Bivariate(

to

Biv = Bivariate(

and change

Report ( Fit Group[1] ) ["Parameter Estimates"][Table Box( 3)] << Make Combined Data Table;

to

Report ( Biv[1] ) ["Parameter Estimates"][Table Box( 1)] << Make Combined Data Table;
Jim
jnikkel
Level II

Re: Bivarate Linear Fit of multiple Regressions - Scripting a Combined Data table from Parameter Estimates

I was so close, thank you!

Recommended Articles