cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

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