cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
DWS
DWS
Level II

How does JMP do BoxCox transformations?

I have recently been converting JMP formulas into Excel using the python code option. I have been unable to actually transfer any formula (MLR) involving a BoxCox transformation. It have manually done the calculations following the formula and have gone numbers in the multimillions instead of 100 thousands where it should be. If someone knows if the formula is already converted back or If I need to and what I need to do to apply the inverse BoxCox to get it back in normal terms. I don't know if I am missing something or if the Python Code through the publish formula option is missing something. I was hoping that someone could explain how JMP preforms the Box Cox transformation so that I can better understand it to potentially fix it. I tried to attach the code of the formula but it wouldn't allow me to post. Any help would be appreciated.

23 REPLIES 23
DWS
DWS
Level II

Re: How does JMP do BoxCox transformations?

I appreciate the help,  I am fully aware of all of that. This is just an example I created to send you to show you the significant difference the intercepts of BC and non BC formulas. Do know why the intercepts are so different? 

MRB3855
Super User

Re: How does JMP do BoxCox transformations?

@DWS  Well…one is based on BoxCox(Y) and the other is based on Y; so why wouldn’t the intercepts be different? And I’m not trying to be obtuse.

 

Let’s set aside the biased and zeroed parameter estimates issue for now. For both models, least squares is used to estimate the parameters in the respective models. And each will have a different set of parameter estimates based on the least squares procedure. They are different because the responses are different (one is Y, the other is BoxCox[Y] ).

 

And if we assume LN transformation, BoxCox[Y] = LN[Y], when we back transform we get Y = exp[int + linear combination of X’s] = exp[int]*exp[linear combination of X’s]. That model is multiplicative…so the intercept in that model has a different effect on Y than the intercept does in the un-transformed additive model.

 

I hope this is helpful. Perhaps I’m not understanding the nature of your question; why is this such a concern?

DWS
DWS
Level II

Re: How does JMP do BoxCox transformations?

I don't know if you can read this image but you can see on the left the predicted values compared. Not fair from each other. then on the right you can see the pages for the Non BC and BC and their parameter estimates at the bottom. I can get the predicted value from the sheet using the Intercept + Estimate (X) formula given in the parameter estimates for the Non BC but not for the BC because the BC estimate is 386 Billion. That is the same number given by the python code so I can't get the accurate number shown on the left in Excel. I want to know the actual formula that JMP is using to calculate the Box Cox Predict shown on the left image.

DWS_0-1751472273732.png

 

MRB3855
Super User

Re: How does JMP do BoxCox transformations?

@DWS   If I’m understanding, can’t you just save the prediction formula via the red triangle menu at the top of the output?

DWS
DWS
Level II

Re: How does JMP do BoxCox transformations?

 It still gives the 3.868e+11

MRB3855
Super User

Re: How does JMP do BoxCox transformations?

@DWS  You are doing something wrong and/or misinterpreting something. What equation are you using in Excel to get a prediction for Y?

DWS
DWS
Level II

Re: How does JMP do BoxCox transformations?

Python straight from JMP
 
def getModelMetadata():
return {"creator": u"Fit Least Squares", "modelName": u"", "predicted": u"BoxCox(Sold Price Adjusted,-1.088)", "table": u"Nation Export", "version": u"18.0.2", "timestamp": u"2025-07-02T17:34:44Z"}
 
 
def getInputMetadata():
    return {
        u"Approx Living Area": "float",
        u"YSB": "float"
}
 
 
def getOutputMetadata():
    return {
        u"Pred Formula BoxCox(Sold Price Adjusted,-1.088)": "float"
}
 
 
def score(indata, outdata):
    outdata[u"Pred Formula BoxCox(Sold Price Adjusted,-1.088)"] = 386761700160.329 + 153.473460505384 * indata[u"Approx Living Area"] + -1519.63590642121 * indata[u"YSB"]
 
    return outdata[u"Pred Formula BoxCox(Sold Price Adjusted,-1.088)"]

 

MRB3855
Super User

Re: How does JMP do BoxCox transformations?

@DWS  It looks to me like you are returning the transformed Y. If you want Y you need to back transform as shown in this pic (where g is the geometric mean of Y).

MRB3855
Super User

Re: How does JMP do BoxCox transformations?

@DWS  I’ll try to explain further. Your equation in the outdata function is not correct. If you let that function be the f(x) in the attached pic, and you let g= geometric mean of Y, you will get what you want.

 

Ie., let f(x) = 386761700160.329 + 153.473460505384 * indata[u"Approx Living Area"] + -1519.63590642121 * indata[u"YSB"] in the attached pic. 

DWS
DWS
Level II

Re: How does JMP do BoxCox transformations?

Maybe I am not so good at math but I haven't been able to do it. Also I need to be able to enter it into Excel and a function. Not that exact same formula but a very similar one. This is the formula editor for it. Would this work? That is scientific notation correct?

DWS_0-1751486716225.png

 

Recommended Articles