-
Notifications
You must be signed in to change notification settings - Fork 19
[Analyse Design] Stepwise analysis #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
JohnnyDoorn
commented
Sep 22, 2025
- Uses step function based on AIC, forward and backward
- As requested here
- Rewrote the formula table a bit so that it plays nice with intercept-only models
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements stepwise model selection for DOE analysis based on AIC criteria, allowing users to choose between "Enter" (simultaneous), "Backward" (removal), and "Forward" (addition) methods. It also refactors the formula generation to handle intercept-only models more robustly.
Key changes:
- Added stepwise analysis method selection dropdown with three options (Enter, Backward, Forward)
- Implemented stepwise regression using AIC-based step function with detailed tracking of model progression
- Refactored formula table generation to use a more concise approach and handle edge cases better
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| inst/qml/doeAnalysis.qml | Adds UI dropdown for stepwise method selection |
| R/doeAnalysis.R | Implements stepwise regression logic, results table, and refactors formula generation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@JTPetter Will you have time to review this? Or should I tag someone else? |
|
@JohnnyDoorn Yes, but probably not before end of the month or a bit later. So if you want it more urgent it's probably better to tag someone else. |
|
@JohnnyDoorn I had a first look at this. Looks good to me, except for a few things:
|
|
Hi @JTPetter I hope you don't mind my unsolicited interruption? But I've been nosing around in some of these repositories because at the moment I am trying to help Johnny in adding a new function to regression, and while he is busy, I thought I might see where else I can help. This seems to be one such place! I don't have, and have never used Minitab, so I cannot say for certain, but it appears to me that the "AICc" is what is known as the second-order or small sample AIC (AICc) It is available in R here: https://search.r-project.org/CRAN/refmans/AICcmodavg/html/AICc.html If it is necessary for you to maintain strict computational reproducibility with Minitab, it might be possible thus. Best, Tarandeep Kang, PhD Student, Department of Psychology, University of Warwick |
|
@TarandeepKang Thanks for your addition. No, strict computational reproducibility with other software is not necessary I'd say, except when the same settings / method is used, of course. Since we have a different method here I see point 3. as optional... |
8921661 to
9fc8c96
Compare
|
OK, so I've added padding in input panel to avoid overlap and I've made error message a bit more informative (I looked into your suggestion but that requires some pretty heavy restructuring of the code), as it now suggests to the user to use a different method or model. |

