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
nathan-clark
Level VI

Regression functions in JMP

Are there any pre-existing functions in JMP for some of the regressions performed by Fit Y by X or the Fit Curve platforms?

For most of my code, when I want the parameters  for a 3P or 2nd Order polynomial, etc. I will call the platform in JMP with a BY variable and then 'make combined data table'. However, the one downside is that JMP "needs" to render the graphics in order to grab the data table...

Well, with larger data, the BY variable is far too large and JMP either dies, runs out of RAM or has other issues when trying to do this operation (one of my larger sets has a BY variable with about 40k unique values).

 

One 'fix' would be to just remove the by, and call the platform in a FOR loop for each of the data sets separately. I am not sure that would be faster or not ... Ideally, I could create a single matrix or series of matricies and quickly get parameters for each set of data. This could be coded into a JSL layer function, but if functions exist in JMP, the overhead would be better controlled ...

To summarize:

1) Does JMP have any existing functions that can calculate parameter coefficients for anything beyond basic linear regression
2) If not, are there better ways to accomplish my goals within current JMP platforms?
3) Are there JSL functions people have made which can do various regressions and return the coefficients

 

Thanks!

 

9 REPLIES 9
P_Bartell
Level VIII

Re: Regression functions in JMP

There are many confusing or unclear points in your original post. So rather than parse through them I'll focus my comments on question #1. Answer: Yes. Have you taken a look at JMP documentation? There are literally scores of regression and non regression methods in JMP...ranging from good old fashioned ordinary least squares, to more elegant/flexible general linear models, to completely non linear/non regression based methods such as the Partition and Neural Network platforms.

statman
Super User

Re: Regression functions in JMP

Echoing @P_Bartell there are many options to model data. Regarding #2, I don't understand what your goal is?  It sounds like you want to create >1st order polynomials.  Is this from observational data or from an experiment?  I don't understand what you mean when you say " I will call the platform in JMP with a BY variable " ? What platform?

Not to be belligerent, but you do realize the reason linear regression is called linear is because the coefficients are linear, not the terms in the model.

"All models are wrong, some are useful" G.E.P. Box
txnelson
Super User

Re: Regression functions in JMP

Rather than forcing JMP to create a data table from the display output, I have found that many times it is easier to go directly to the table of interest and extract the individual values.  This technique can be used to either generate all of the output with a By clause and then going through the display, or by generating one display at a time, extracting what you want, saving it to a table or a list or a matrix, and then closing the output and moving on the the next regression.

reg.PNG

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
biv = dt << Bivariate(
	invisible,
	Y( :NPN1 ),
	X( :PNP1 ),
	Fit Special( Degree( 2 ), Centered Polynomial( 0 ), {Line Color( "Medium Dark Red" )} ),
	by( :site ) // Where( :SITE == 1 )
);

dtOut = New Table( "The Ouput",
	New Column( "Name", character ),
	New Column( "Intercept" ),
	New Column( "Beta" ),
	New Column( "Beta^2" )
);
dtOut << add rows( N Items( biv ) );
For( i = 1, i <= N Items( biv ), i++,
	dtOut:Name[i] = Word( -1, Report( biv[i] )[Outline Box( 1 )] << get title, " " );
	values = (Report( biv[i] )["Parameter Estimates"][Number Col Box( 1 )]) << get;
	dtOut:Intercept[i] = values[1];
	dtOut:Beta[i] = values[2];
	dtOut:Name( "Beta^2" )[i] = values[1];
);
biv << close window;

 

Jim
Georg
Level VII

Re: Regression functions in JMP

Nonlinear platform can fit Parameters for freely definable formulas.

Please check out corresponding documentation.

Georg
nathan-clark
Level VI

Re: Regression functions in JMP

Thanks to everyone so far for their comments. Let me try to clarify some. Basically, I have a data set that contains ~40k subsets. Typically to get regression parameters I would go a Fit Curve or a Fit Y by X and user the BY variable in the platform to break the graphs into the subsets and then fit my line (in this case a 2nd order polynomial, but other times a 3P). From what I have seen Fit Curve and Fit Y by X need to render all the graphics to create the lines and save the parameters, costing a lot of overhead.

I wasn't sure if there was a way to do this kind of thing without rendering the graphics - like a stand alone function that only produced the parameters from the fit desired.

txnelson
Super User

Re: Regression functions in JMP

I should have explicitly stated, that I am not aware of a direct function to create the desired Polynomial or 3P parameters.  My suggestion of getting the results directly from "Invisible" output, is a suggestion to reduce the memory requirements of creating output data tables.

Jim
nathan-clark
Level VI

Re: Regression functions in JMP

@txnelson Yes, I have played with that in the past, and making the table invisible didn't seem to make the report invisible or private as well ... I think having the report private would also be a work around to avoid the overhead of rendering the graphics.

Re: Regression functions in JMP

Have you considered using Fit Model with the Minimal Report emphasis? There are no graphics there to render.

Dan Obermiller
nathan-clark
Level VI

Re: Regression functions in JMP

I hadn't @Dan_Obermiller That's a good idea also!