From 2e6d943b082ca096ced2f8b43047c8ac18c5eb0e Mon Sep 17 00:00:00 2001 From: dpc10ster Date: Thu, 30 Nov 2023 21:15:16 -0500 Subject: [PATCH] shortened some names --- R/{ORAnalysisSplitPlot.R => OR_SP.R} | 4 ++-- R/StSP.R | 12 ++++-------- man/StSP.Rd | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) rename R/{ORAnalysisSplitPlot.R => OR_SP.R} (99%) diff --git a/R/ORAnalysisSplitPlot.R b/R/OR_SP.R similarity index 99% rename from R/ORAnalysisSplitPlot.R rename to R/OR_SP.R index 4b6a33a2..f21f68c0 100644 --- a/R/ORAnalysisSplitPlot.R +++ b/R/OR_SP.R @@ -1,6 +1,6 @@ # Implement formulae in Hillis 2014 modified for unequal numbers of readers # In different treatments; this code assumes two treatments -ORAnalysisSplitPlotA <- function(dataset, FOM, alpha , analysisOption) +OR_SP_A <- function(dataset, FOM, alpha , analysisOption) { I <- dim(dataset$ratings$NL)[1]; if (I != 2) stop(" ORAnalysisSplitPlotA assumes two treatments") @@ -188,7 +188,7 @@ ORAnalysisSplitPlotA <- function(dataset, FOM, alpha , analysisOption) -ORAnalysisSplitPlotC <- function(dataset, FOM, alpha, analysisOption) +OR_SP_C <- function(dataset, FOM, alpha, analysisOption) { RRRC <- NULL diff --git a/R/StSP.R b/R/StSP.R index a44831b5..f2b6efcd 100644 --- a/R/StSP.R +++ b/R/StSP.R @@ -34,9 +34,9 @@ #' fileName <- system.file("extdata", "/toyFiles/ROC/rocSpAZP.xlsx", #' package = "RJafroc", mustWork = TRUE) #' dsSpA <- DfReadDataFile(fileName) -#' StSP(dsSpA, FOM = "Wilcoxon") +#' ret <- StSP(dsSpA, FOM = "Wilcoxon") #' -#' StSP(datasetFROCSpC, FOM = "wAFROC") +#' ret <- StSP(datasetFROCSpC, FOM = "wAFROC") #' #' #' @importFrom stats pf pt qt cov pchisq pnorm qnorm @@ -48,17 +48,13 @@ StSP <- function(dataset, FOM, alpha = 0.05, analysisOption = "RRRC") { - # options(stringsAsFactors = FALSE, "digits" = 8) - method <- "OR" - covEstMethod <- "jackknife" - if (dataset$descriptions$design == "SPLIT-PLOT-A") { - return(ORAnalysisSplitPlotA(dataset, FOM, alpha, analysisOption)) + return(OR_SP_A(dataset, FOM, alpha, analysisOption)) } else if (dataset$descriptions$design == "SPLIT-PLOT-C") { - return(ORAnalysisSplitPlotC(dataset, FOM, alpha, analysisOption)) + return(OR_SP_C(dataset, FOM, alpha, analysisOption)) } } diff --git a/man/StSP.Rd b/man/StSP.Rd index f03fb38a..97b83aaa 100644 --- a/man/StSP.Rd +++ b/man/StSP.Rd @@ -47,9 +47,9 @@ Performs Dorfman-Berbaum-Metz (DBM) or Obuchowski-Rockette (OR) fileName <- system.file("extdata", "/toyFiles/ROC/rocSpAZP.xlsx", package = "RJafroc", mustWork = TRUE) dsSpA <- DfReadDataFile(fileName) -StSP(dsSpA, FOM = "Wilcoxon") +ret <- StSP(dsSpA, FOM = "Wilcoxon") -StSP(datasetFROCSpC, FOM = "wAFROC") +ret <- StSP(datasetFROCSpC, FOM = "wAFROC") }