cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit. Register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
Al_Rom24
Level I

Logistic 3P parameters calculation

I´m currently working on a prediction model using Logistic 3P fit with JMP. I´m obtaining very good curves using the calculated fit model. The model is the following:

y= c/{1+exp[a*(x-b)]}

Where a is the growth factor, b is the inflexion point and c is the asymptote

My specific doubt is the following, How can I obtain a, b and c?

I need to justify my model with my data. Looking in my script, it only shows me something like that "Dispatch( {"Logistic 3P"}, "Prediction Model", OutlineBox, {Close( 0 )} ),". So finally I need to understand how I´m obtaining my prediction curves and the model. So I want to know how I can perform this kind of analysis using my data.

 

Best

 

Alonso

1 ACCEPTED SOLUTION

Accepted Solutions
SDF1
Super User

Re: Logistic 3P parameters calculation

Hi @Al_Rom24 ,

 

  Well, on the one hand, JMP is a commercially available software and the details of the algorithm it uses will be hidden within the programming of the product, so you won't be able to get down to the nitty-gritty of how JMP determines those coefficients, so to speak.

 

  But, in principle, it likely will do an iterative regression analysis, probably looking at both the first derivative and second derivative of the fit function in order to determine the minimum fit statistic (AICc, etc, as mentioned before). I come back to the example of a line. If you have three data points (3,5), (6,10), and (12,22), you can fit several different lines to those three points, but there will be one line which reduces the fit residual and be the most accurate fit. JMP's algorithm determines these for you so you don't have to do it manually -- a very tedious task since the exp function is a transcendental function. But, it's not open-source, so you'll never know the exact code that got you the coefficients. If you are looking to know exactly how to do it, I would suggest writing your own code in and performing the gradient decent iterations so that you know exactly how the values are determined. Have you ever done linear regression by hand or by code? The same basic principles apply here, it's just more complicated.

 

  Since you mention that you have different groups that you're fitting the logistic function to, you should consider how those groups differ. Why is there not a "universal" fit for all the data? What makes them different so as to result in different coefficients for the different groups? Should the y-intercept/asymptote of the fit be the same across all groups? If yes (or no), why? Do the inflection points need to be all the same or the large x asymptotes? What about your subject or experiments can you use to either constrain the fits (i.e. all the same y-intercept, or same inflection point), or explain why the coefficients are different?  These kinds of questions are ones that you will need to answer with your subject-matter expertise that others here don't have. 

 

Good luck!,

DS

View solution in original post

3 REPLIES 3
SDF1
Super User

Re: Logistic 3P parameters calculation

Hi @Al_Rom24 ,

 

  I'm not exactly sure what you're problem is, but I think there might be some misunderstanding or confusion about your data and the model fit that you are using.

 

  First of all, the data are the data. If you're working to try and fit the data to a model of some kind, it helps if you have some kind of theoretical framework as a model to use. The theoretical framework (if you have one) is the "justification" for using a particular model over another one. For example, in physics, if you want to describe the motion of an object in a gravitational potential, like on Earth, you'd use two formulas: y(t) = y0 + vy0*t -0.5*g*t^2 to describe the y-motion and x(t) = x0 + vx0*t for the x-motion. This is the theoretical framework that you base the model of the motion -- e.g. projectile motion in Earth's gravitational field. You wouldn't use the framework of oscillatory motion like f(t) = A*sin(w*t) to describe projectile motion because it's not applicable.

 

  So, when it comes to modeling your data, you should think about the theoretical framework and what theories best apply to your situation at hand. Sometimes that's not possible and you need to use an empirical formula -- one that does the best job at not only fitting your data, but also predicting outcomes accurately (this last part requires extra steps). To be clear, you do not justify the model with your data, but rather either use a theoretical framework for that or you need to use empirical modeling to determine the best model and with your subject matter-expertise argue why such a model is the most appropriate to describe your specific situation.

 

  When JMP performs the regression fit to your data, it's basically allowing the variables a, b, and c to vary in order to determine the best fit that has the lowest residual error. Think of it as a linear regression, y = mx+b. In this case you have two variable m and b, both of which can vary, but only the right combination of them will provide the lowest overall residual error. In the logistic model, you have three variables, and the right combination of those variables will result in the lowest residual error. This residual can be calculated or represented in a variety of different ways, like AICc, BIC, SSE, MSE, RMSE, or R^2 for example. When you perform the nonlinear Logistic 3P (3P, 3-parameter) fit, JMP reports back what these coefficients are along with some statistics about them.

 

  If you really wanted to do this on your own, you could do some estimations on the function as you take the limit of small x, large x, and when x=b. But, this would be somewhat slow and tedious. JMP does it all for you, and also provides statistical evaluations of those estimates in order to provide a meaningful model to your data.

 

  Remember that you need to have at least one more data point than the number of coefficients that you're trying to model: if you have three data points and try to fit a logistic 3p to it, you will have a perfectly constrained fit that has 0 degrees of freedom and poor statistical relevance -- much like fitting a line to two points, there's no wiggle room, the line fits those points exactly, so no statistics can be done on the coefficients.

 

Hope this helps!,

DS

Al_Rom24
Level I

Re: Logistic 3P parameters calculation

Thanks for your response DS,

 

I understand your explanation and I appreciate it. I am using JMP to see how the data from some experiments behave in order to create a predictive model. Using the option "Analyze>>Specialized model>>Fit curve, selecting the response "relative" and regressor "equivalent", grouping my data in different levels (in this case, water content) and finally fitting the data using Logistic 3P. I´m looking into the results and I´m seeing that this model is delivering something that I expected and JMP is showing me that the model has an R^2=0.98 (I attached some images of my results).

 

Seeing my results, the constants a, b and c are different for each group. So finally, I´m interested in how JMP obtained these constants, since, as mentioned above, each of these constants will depend on the corresponding group.

 

Thank you

 

AlRom

 

SDF1
Super User

Re: Logistic 3P parameters calculation

Hi @Al_Rom24 ,

 

  Well, on the one hand, JMP is a commercially available software and the details of the algorithm it uses will be hidden within the programming of the product, so you won't be able to get down to the nitty-gritty of how JMP determines those coefficients, so to speak.

 

  But, in principle, it likely will do an iterative regression analysis, probably looking at both the first derivative and second derivative of the fit function in order to determine the minimum fit statistic (AICc, etc, as mentioned before). I come back to the example of a line. If you have three data points (3,5), (6,10), and (12,22), you can fit several different lines to those three points, but there will be one line which reduces the fit residual and be the most accurate fit. JMP's algorithm determines these for you so you don't have to do it manually -- a very tedious task since the exp function is a transcendental function. But, it's not open-source, so you'll never know the exact code that got you the coefficients. If you are looking to know exactly how to do it, I would suggest writing your own code in and performing the gradient decent iterations so that you know exactly how the values are determined. Have you ever done linear regression by hand or by code? The same basic principles apply here, it's just more complicated.

 

  Since you mention that you have different groups that you're fitting the logistic function to, you should consider how those groups differ. Why is there not a "universal" fit for all the data? What makes them different so as to result in different coefficients for the different groups? Should the y-intercept/asymptote of the fit be the same across all groups? If yes (or no), why? Do the inflection points need to be all the same or the large x asymptotes? What about your subject or experiments can you use to either constrain the fits (i.e. all the same y-intercept, or same inflection point), or explain why the coefficients are different?  These kinds of questions are ones that you will need to answer with your subject-matter expertise that others here don't have. 

 

Good luck!,

DS