Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: jaspQualityControl
Type: Package
Title: Quality Control Module for JASP
Version: 0.96.0
Version: 0.96.1
Date: 2022-10-25
Author: JASP Team
Website: https://github.com/jasp-stats/jaspQualityControl
Expand Down
35 changes: 22 additions & 13 deletions R/processCapabilityStudies.R
Original file line number Diff line number Diff line change
Expand Up @@ -1115,8 +1115,10 @@ processCapabilityStudies <- function(jaspResults, dataset, options) {
sourceVector <- c(sourceVector, paste0(ciLevelPercent, "% CI Cpk"))
}

if (options[["processCapabilityTableZbench"]]) {
table$addColumnInfo(name="zbench", title=gettext("Z bench (ST)"), type="number")
if (options[["processCapabilityTableZ"]]) {
table$addColumnInfo(name="zSt", title=gettext("Z (ST)"), type="number")
tableColNames <- c(tableColNames, "zSt")
sourceVector <- c(sourceVector, "Z (ST)")
}

table$showSpecifiedColumnsOnly <- TRUE
Expand Down Expand Up @@ -1158,8 +1160,6 @@ processCapabilityStudies <- function(jaspResults, dataset, options) {
} else {
cpk <- cpu
}
zbench <- 3*cpk


if (options[["processCapabilityTableCi"]]) {
ciAlpha <- 1 - ciLevel
Expand All @@ -1178,11 +1178,14 @@ processCapabilityStudies <- function(jaspResults, dataset, options) {
ciUbCpk <- cpk + (normCIrange * intervalCpk)
}
}
tableDfCurrentStage <- data.frame(cp = round(cp, .numDecimals),
tableDfCurrentStage <- data.frame(cp = round(cp, .numDecimals),
cpl = round(cpl, .numDecimals),
cpu = round(cpu, .numDecimals),
cpk = round(cpk, .numDecimals),
zbench = round(zbench, .numDecimals))
cpk = round(cpk, .numDecimals))

if (options[["processCapabilityTableZ"]])
tableDfCurrentStage[["zSt"]] <- round(3*cpk, .numDecimals)

if (options[["processCapabilityTableCi"]]) {
if (!(options[["lowerSpecificationLimitBoundary"]] || options[["upperSpecificationLimitBoundary"]])) {
tableDfCurrentStage[["cplci"]] <- round(ciLbCp, .numDecimals)
Expand Down Expand Up @@ -1248,6 +1251,8 @@ processCapabilityStudies <- function(jaspResults, dataset, options) {
if (options[["processCapabilityTableCi"]] &&
!(options[["upperSpecificationLimitBoundary"]] && options[["lowerSpecificationLimitBoundary"]]))
formattedTableDf[["cpkci"]] <- paste0("[", tableList[["cpklci"]], ", ", tableList[["cpkuci"]], "]")
if (options[["processCapabilityTableZ"]])
formattedTableDf[["zSt"]] <- tableList[["zSt"]]
colnames(formattedTableDf) <- sourceVector
return(formattedTableDf)
}
Expand Down Expand Up @@ -1311,8 +1316,10 @@ processCapabilityStudies <- function(jaspResults, dataset, options) {
tableColNames <- c(tableColNames, "ppklci", "ppkuci")
sourceVector1 <- c(sourceVector1, paste0(ciLevelPercent, "% CI Ppk"))
}
if (options[["processCapabilityTableZbench"]]) {
table$addColumnInfo(name="zbench", title=gettext("Z bench (LT)"), type="number")
if (options[["processCapabilityTableZ"]]) {
table$addColumnInfo(name="zLt", title=gettext("Z (LT)"), type="number")
tableColNames <- c(tableColNames, "zLt")
sourceVector1 <- c(sourceVector1, "Z (LT)")
}
if (options[["target"]]) {
table$addColumnInfo(name = "cpm", type = "integer", title = gettext("Cpm"))
Expand Down Expand Up @@ -1366,7 +1373,6 @@ processCapabilityStudies <- function(jaspResults, dataset, options) {
} else {
ppk <- ppu
}
zbench <- 3*ppk
cp <- (usl - lsl) / (tolMultiplier * sdw)

if (options[["lowerSpecificationLimit"]] && options[["upperSpecificationLimit"]] && options[["target"]]) {
Expand Down Expand Up @@ -1408,11 +1414,12 @@ processCapabilityStudies <- function(jaspResults, dataset, options) {
}
}

tableDfCurrentStage <- data.frame(pp = round(pp, .numDecimals),
tableDfCurrentStage <- data.frame(pp = round(pp, .numDecimals),
ppl = round(ppl, .numDecimals),
ppu = round(ppu, .numDecimals),
ppk = round(ppk, .numDecimals),
zbench = round(zbench, .numDecimals))
ppk = round(ppk, .numDecimals))
if (options[["processCapabilityTableZ"]])
tableDfCurrentStage[["zLt"]] <- round(3*ppk, .numDecimals)
if (options[["target"]])
tableDfCurrentStage[["cpm"]] <- round(cpm, .numDecimals)
if (options[["processCapabilityTableCi"]]) {
Expand Down Expand Up @@ -1489,6 +1496,8 @@ processCapabilityStudies <- function(jaspResults, dataset, options) {
if (options[["processCapabilityTableCi"]] &&
!(options[["lowerSpecificationLimitBoundary"]] && options[["upperSpecificationLimitBoundary"]]))
formattedTableDf[["ppkci"]] <- paste0("[", tableList[["ppklci"]], ", ",tableList[["ppkuci"]], "]")
if (options[["processCapabilityTableZ"]])
formattedTableDf[["zLt"]] <- tableList[["zLt"]]
if (options[["target"]]) {
formattedTableDf[["cpm"]] <- tableList[["cpm"]]
if (options[["processCapabilityTableCi"]] &&
Expand Down
10 changes: 10 additions & 0 deletions inst/Upgrades.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1422,4 +1422,14 @@ Upgrades
ChangeRename {from: "reportTime"; to: "reportTimeText"}
ChangeRename {from: "reportFrequency"; to: "reportFrequencyText"}
}

// Z.bench to Z
Upgrade
{
functionName: "processCapabilityStudies"
fromVersion: "0.96.0"
toVersion: "0.96.1"

ChangeRename {from: "processCapabilityTableZbench"; to: "processCapabilityTableZ"}
}
}
4 changes: 2 additions & 2 deletions inst/help/processCapabilityStudies.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ The size of the subgroups is relevant for the calculation of the process varianc
Process capability is determined by the variation that comes from common causes. It generally represents the best (potential) performance of the process. This is demonstrated when the process is being operated in a state of statistical control regardless the specifications [1].
Capability index Cp compares the process capability to the maximum allowable variation as indicated by the tolerance.
Cp is not impacted by the process location. This index can be calculated only for bilateral (two-sided) tolerances, it has no meaning for the one-sided situation (unilateral tolerance, with only one specification limit).
Capability index Cpk takes the process location as well as the capability into account. Cpk will always be less than or equal to Cp.
Capability index Cpk takes the process location as well as the capability into account. Cpk will always be less than or equal to Cp. Z (ST) is equal to 3 * Cpk and corresponds to the distance of the process mean to the nearest bound in standard deviation units.
*Note*: Capability study reports contain meaningless numbers if processes are not in a state of statistical control.

- Process performance (total): the Pp and its confidence interval's values, PpL, PpU, PpK and its confidence interval's values, Cpm and its confidence interval's values.
Expand All @@ -106,7 +106,7 @@ The size of the subgroups is relevant for the calculation of the process varianc
Performance index Pp compares the process performance to the maximum allowable variation as indicated by the tolerance [1].
Pp is not impacted by the process location. This index can be calculated only for bilateral (two-sided) tolerances, it has no meaning for the one-sided situation (unilateral tolerance, with only one specification limit).
Performance index Ppk takes the process location as well as the performance into account.
Ppk will always be less than or equal to Pp.
Ppk will always be less than or equal to Pp. Z (LT) is equal to 3 * Ppk and corresponds to the distance of the process mean to the nearest bound in standard deviation units.
The Cpm index indicates how well the process can produce within specifications. Its calculation is similar to Cp, except that the standard deviation is calculated using the target value instead of the mean. The larger the Cpm, the more likely the process will produce output that meets specifications and is close to the target value.

- Non-conformance statistics: the observed of ppm outside the specification limits, the expected ppm outside the specifications limits based on the overall standard deviation and the within standard deviation.
Expand Down
4 changes: 2 additions & 2 deletions inst/qml/processCapabilityStudies.qml
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ Form

CheckBox
{
name: "processCapabilityTableZbench"
label: qsTr("Z bench")
name: "processCapabilityTableZ"
label: qsTr("Z (ST) / Z (LT)")
}

}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading