Skip to content

Conversation

@JohnnyDoorn
Copy link
Contributor

  • Uses step function based on AIC, forward and backward
  • Rewrote the formula table a bit so that it plays nice with intercept-only models

@JohnnyDoorn JohnnyDoorn requested a review from Copilot September 22, 2025 19:38
Copy link

Copilot AI left a 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.

@jasp-stats jasp-stats deleted a comment from Copilot AI Sep 23, 2025
@JohnnyDoorn
Copy link
Contributor Author

@JTPetter Will you have time to review this? Or should I tag someone else?

@JTPetter
Copy link
Contributor

JTPetter commented Oct 2, 2025

@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.

@JTPetter
Copy link
Contributor

@JohnnyDoorn I had a first look at this. Looks good to me, except for a few things:

  1. When the AIC estimation fails, the whole analysis crashes. This is maybe a bit harsh, maybe it could then just give the full model and add a footnote that the model comparison failed? See here:
image
  1. The dropdown for method moved the other input fields down and they are now overlapping with checkboxes below:
image
  1. I cannot reproduce the model selection with Minitab. Minitab has different methods, most based on p-values, but they also have forward AIC (or actually AICc, some corrected version I suppose). And the forward AICc of Minitab gives me a different model.

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