Skip to content

Adding Binomial and Poisson capability - #504

Open
julianwuth wants to merge 11 commits into
jasp-stats:masterfrom
julianwuth:adding-binomial-capability
Open

Adding Binomial and Poisson capability#504
julianwuth wants to merge 11 commits into
jasp-stats:masterfrom
julianwuth:adding-binomial-capability

Conversation

@julianwuth

Copy link
Copy Markdown
Contributor
  • Code for Binomial and Poisson process capability analysis

julianwuth and others added 8 commits August 9, 2026 11:34
There were some problems with the x-axis labels for the histogram of the residuals in DOE.

This is fixed by:
- Using jaspGraphs::jaspHistogram
- Updating snapshots accordingly
- Additionally, the binwidth method now carries over to the matrix plot.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@julianwuth

Copy link
Copy Markdown
Contributor Author

This requires #461 to be merged.

julianwuth added a commit to julianwuth/jaspQualityControl that referenced this pull request Aug 31, 2026
Requires jasp-stats#504 to be merged
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.38462% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.11%. Comparing base (5adc0f5) to head (bbd0545).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
R/processCapabilityAttributes.R 95.44% 25 Missing ⚠️
R/processCapabilityStudies.R 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #504      +/-   ##
==========================================
+ Coverage   84.44%   85.11%   +0.67%     
==========================================
  Files          18       19       +1     
  Lines       10513    11088     +575     
==========================================
+ Hits         8878     9438     +560     
- Misses       1635     1650      +15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@julianwuth
julianwuth requested review from JTPetter and a lite review from Copilot August 31, 2026 08:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Switching capabilityDataType can leave stale attribute outputs because the attributeCapability container is not cleared/invalidated when returning to the continuous mode.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds attribute (count) process capability support to the JASP QualityControl module by branching Process Capability Studies into a new binomial/Poisson pipeline and extending the shared control-chart engine with p/u charts; also updates tests/datasets/snapshots accordingly.

Changes:

  • Route processCapabilityStudies() to an attribute-capability implementation when capabilityDataType == "attributes", and extend control-chart calculations/rule handling to support p and u charts.
  • Add binomial/Poisson capability datasets and snapshot-based plot expectations; update example-based tests to merge QML defaults with .jasp-stored options.
  • Misc: update DOE residual histogram plotting and adjust repo ignores/tooling files (large cleanup).
File summaries
File Description
R/processCapabilityStudies.R Adds early branch into attribute capability; expands dependencies to include capabilityDataType.
R/commonQualityControl.R Extends control chart codepaths to handle p/u charts and limits rule sets accordingly.
R/doeAnalysis.R Switches residual histogram plotting to jaspGraphs::jaspHistogram() and updates dependencies.
inst/help/attributesCharts.md Documents relationship between Attributes Charts and Process Capability Studies p/u charts.
tests/testthat/test-example-ProcessCapabilityStudyWideFormat.R Merges default options into .jasp options to avoid missing newly-added options.
tests/testthat/test-example-ProcessCapabilityStudyLongFormat.R Same default-option merge for long-format example test.
tests/testthat/datasets/processCapabilityStudy/poissonCapabilityMissing.csv Adds Poisson capability test data with missing values.
tests/testthat/datasets/processCapabilityStudy/poissonCapabilityEdgeCases.csv Adds Poisson capability edge-case data (zero/fractional columns).
tests/testthat/datasets/processCapabilityStudy/poissonCapability.csv Adds baseline Poisson capability dataset.
tests/testthat/datasets/processCapabilityStudy/binomialCapabilityMissing.csv Adds binomial capability test data with missing values.
tests/testthat/datasets/processCapabilityStudy/binomialCapabilityEdgeCases.csv Adds binomial capability edge-case data (zero/fractional columns).
tests/testthat/datasets/processCapabilityStudy/binomialCapability.csv Adds baseline binomial capability dataset.
tests/testthat/_snaps/processCapabilityPoisson/poisson-report-subplot-8.svg Adds/updates Poisson report snapshot subplot.
tests/testthat/_snaps/processCapabilityPoisson/poisson-report-subplot-6.svg Adds/updates Poisson report snapshot subplot.
tests/testthat/_snaps/processCapabilityPoisson/poisson-report-subplot-5.svg Adds/updates Poisson report snapshot subplot.
tests/testthat/_snaps/processCapabilityPoisson/poisson-report-subplot-1.svg Adds/updates Poisson report snapshot subplot.
tests/testthat/_snaps/processCapabilityPoisson/poisson-histogram.svg Adds/updates Poisson histogram snapshot.
tests/testthat/_snaps/processCapabilityBinomial/binomial-report-subplot-8.svg Adds/updates binomial report snapshot subplot.
tests/testthat/_snaps/processCapabilityBinomial/binomial-report-subplot-6.svg Adds/updates binomial report snapshot subplot.
tests/testthat/_snaps/processCapabilityBinomial/binomial-report-subplot-5.svg Adds/updates binomial report snapshot subplot.
tests/testthat/_snaps/processCapabilityBinomial/binomial-report-subplot-1.svg Adds/updates binomial report snapshot subplot.
renv.lock Updates locked package versions/metadata (e.g., igraph).
inst/help/attributesCharts.md Adds guidance clarifying differences between chart implementations.
.vscode/mcp.json Removes editor MCP server config.
.mcp.json Removes repo-root MCP server config.
.gitignore Adds ignore rules for AI/tooling directories and several repo-doc/instruction paths.
.github/instructions/translation.instructions.md Removes GitHub instruction file.
.github/instructions/testing.instructions.md Removes GitHub instruction file.
.github/instructions/R.instructions.md Removes GitHub instruction file.
.github/instructions/jasp-tables.instructions.md Removes GitHub instruction file.
.github/instructions/jasp-state-management.instructions.md Removes GitHub instruction file.
.github/instructions/jasp-plots.instructions.md Removes GitHub instruction file.
.github/instructions/jasp-output-structure.instructions.md Removes GitHub instruction file.
.github/instructions/jasp-module-architecture.instructions.md Removes GitHub instruction file.
.github/instructions/jasp-dependency-management.instructions.md Removes GitHub instruction file.
.github/instructions/jasp-containers-and-errors.instructions.md Removes GitHub instruction file.
.github/instructions/inst.qml.instructions.md Removes GitHub instruction file.
.claude/settings.local.json Removes Claude Code local settings.
.claude/session_startup.R Removes Claude Code session bootstrap script.
.claude/rules/translation-instructions.md Removes Claude Code rule file.
.claude/rules/testing-instructions.md Removes Claude Code rule file.
.claude/rules/r-instructions.md Removes Claude Code rule file.
.claude/rules/qml-instructions.md Removes Claude Code rule file.
.claude/rules/jasp-tables.md Removes Claude Code rule file.
.claude/rules/jasp-state-management.md Removes Claude Code rule file.
.claude/rules/jasp-plots.md Removes Claude Code rule file.
.claude/rules/jasp-output-structure.md Removes Claude Code rule file.
.claude/rules/jasp-module-architecture.md Removes Claude Code rule file.
.claude/rules/jasp-dependency-management.md Removes Claude Code rule file.
.claude/rules/jasp-containers-and-errors.md Removes Claude Code rule file.
.claude/rules/git-workflow.md Removes Claude Code rule file.
.claude/README.md Removes Claude Code documentation.
.claude/mcp-server.R Removes Claude Code MCP server bootstrap script.
.claude/hooks/block-test-edits.js Removes Claude Code hook script.
Review details
  • Files reviewed: 51/117 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +20 to 26
# Attribute (count) data has its own data entry, charts and statistics and shares nothing with the
# continuous pipeline below, so it branches out before any of it. Which of the two attribute
# analyses runs, binomial or Poisson, is decided there by attributeDistribution.
if (options[["capabilityDataType"]] == "attributes")
return(.qcAttributeCapability(jaspResults, dataset, options))

wideFormat <- options[["dataFormat"]] == "wideFormat"
julianwuth added a commit to julianwuth/jaspQualityControl that referenced this pull request Aug 31, 2026
Requires jasp-stats#504 to be merged
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.

4 participants