Skip to content

Conversation

Kucharssim
Copy link
Member

@Kucharssim Kucharssim commented Aug 29, 2025

Part of a fix for Gitea SGC#15 and prerequisite for Gitea SGC#6

@JTPetter: For the Box-Cox, I added an option to estimate lambda as described in the Minitab manual: https://support.minitab.com/en-us/minitab/help-and-how-to/quality-and-process-improvement/control-charts/how-to/box-cox-transformation/methods-and-formulas/methods-and-formulas/. But I don't have Minitab. Would it be possible to check whether this implementation indeed gives similar results (there will always probably be some small numerical differences though)?

@JTPetter
Copy link

JTPetter commented Sep 10, 2025

@Kucharssim I cannot reproduce the results from Minitab. There seem to be two points here:

  1. Minitab has a different way of calculating Lambda depending on the defined group size (see below). This is also laid out in the methods and formula section you linked. Only when I treat everything as one big group, the lambda matches.
image
  1. Even when the Lambda matches, the transformation does not seem to be right. Minitab appears to simply take datapoint^lambda. With the lambda from JASP and the data points I can reproduce the Minitab results, but the transformed values from JASP seem to follow another calculation.

Let me know if I can support you with this!

@Kucharssim
Copy link
Member Author

Kucharssim commented Sep 16, 2025

Thanks for checking!

Summary of the changes since your testing:

  1. The minitab version of the Box-Cox is now only defined as x^lambda instead of the standard box-cox (x^lambda - 1)/lambda. I've also documented these details in the help files.
  2. The minitab version can now do estimation of lambda for grouped data (using pooled sd), as well as "invidual data" (using the unbiased average moving range). The function assumes the data is in a long format (what minitab calls "single column format")

I've also added the Johnson transform (not to be confused with Yeo-Johnson: different methods!) that is also apparently provided by Minitab. The two implementations will probably differ though (Minitab uses different criterion for selecting the optimal parameters of the transform than the original paper). As far as I can see in the docs, this transform is only used within Minitab to tranform the data regardless of the data subgroups. The function also returns some additional info in the attributes, which will be useful for integrating this transform in the process capability study analysis.

jasp-stats/jasp-desktop#6000 needs to reflect the recent changes but this PR is ready for review again.

@JTPetter
Copy link

@Kucharssim I can reproduce the Lambda calculations now. However, there is another step in the transformation in Minitab that I missed. Minitab also usually rounds the Lambda that is used for the transformation. So while the unrounded Lambda matches, the transformed data do not yet match. You can find the details here: https://support.minitab.com/en-us/minitab/help-and-how-to/quality-and-process-improvement/control-charts/how-to/box-cox-transformation/interpret-the-results/key-results/. For this, CIs for Lambda are needed and I could not find any information on how to calculate these on the Minitab website.

As you pointed out the Johnson transformation differs in results from Minitab. Not sure which implementation is better, but would it be feasible to also have a version that emulates Minitab?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants