Skip to content

Commit

Permalink
Fix 2867
Browse files Browse the repository at this point in the history
  • Loading branch information
JTPetter committed Aug 9, 2024
1 parent cc69dd0 commit eef5af4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions R/msaGaugeRR.R
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,15 @@ msaGaugeRR <- function(jaspResults, dataset, options, ...) {
if (singleOperator || interactionSignificant){

#r & R varcomps
if(singleOperator){
if (singleOperator) {
varCompList <- .gaugeCrossedVarCompsSingleOP(data, operators, parts, measurements, msPart, msRepWithInteraction)
varCompRepeat <- varCompList$repeatability
varCompPart <- varCompList$part
varCompTotalGauge <- varCompList$totalGauge
varCompTotalVar <- varCompList$totalVar
varCompVector <- c(varCompTotalGauge, varCompRepeat, varCompPart, varCompTotalVar)
sources <- gettext(c("Total gauge r&R", "Repeatability", "Part-to-part", "Total variation"))
}else {
} else {
varCompList <- .gaugeCrossedVarComps(data, operators, parts, measurements, msPart, msOperator, msRepWithInteraction, msInteraction)
varCompRepeat <- varCompList$repeatability
varCompOperator <- varCompList$operator
Expand Down Expand Up @@ -989,11 +989,14 @@ msaGaugeRR <- function(jaspResults, dataset, options, ...) {
interaction <- (msInteraction - msRep) / nReplicates
part <- (msPart - msInteraction) / (nOperators * nReplicates)
reprod <- operator + interaction
}else{
} else {
operator <- (msOperator - msRep) / (nParts * nReplicates)
part <- (msPart - msRep) / (nOperators * nReplicates)
reprod <- operator
}
operator <- max(0, operator)
part <- max(0, part)
reprod <- max(0, reprod)
totalGauge <- repeatability + reprod
totalVar <- totalGauge + part
varcompList <- list(repeatability = repeatability,
Expand Down

0 comments on commit eef5af4

Please sign in to comment.