From 0002c75c2eced8043bcddc82ba0dbf7531156f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Barto=C5=A1?= <38475991+FBartos@users.noreply.github.com> Date: Wed, 30 Aug 2023 13:09:44 +0200 Subject: [PATCH] Meta-Analyses of Predictive Performance release fixes (#191) * fixes link functions fixes: https://github.com/jasp-stats/jasp-test-release/issues/2357#issuecomment-1682054145 * fixes input check fixes: https://github.com/jasp-stats/jasp-test-release/issues/2357#issue-1854740424 --- R/classicalpredictionperformance.R | 2 +- .../qml_components/PredictionPerformanceInference.qml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/R/classicalpredictionperformance.R b/R/classicalpredictionperformance.R index c27ba28b..21cf19c3 100644 --- a/R/classicalpredictionperformance.R +++ b/R/classicalpredictionperformance.R @@ -97,7 +97,7 @@ ClassicalPredictionPerformance <- function(jaspResults, dataset, options, stat .quitAnalysis(gettext("The study labels contain invalid characters. Please, remove them before running the analysis.")) } - .hasErrors(dataset = dataset[,!grepl(options[["studyLabel"]], colnames(dataset))], + .hasErrors(dataset = dataset[,varNames], type = c("infinity", "observations", "negativeValues"), observations.amount = "< 2", exitAnalysisIfErrors = TRUE) diff --git a/inst/qml/qml_components/PredictionPerformanceInference.qml b/inst/qml/qml_components/PredictionPerformanceInference.qml index d31a9876..7a84505d 100644 --- a/inst/qml/qml_components/PredictionPerformanceInference.qml +++ b/inst/qml/qml_components/PredictionPerformanceInference.qml @@ -46,17 +46,22 @@ Section { name: "withinStudyVariation" label: qsTr("Within-study variation") - values: if (analysisType == "bayesian" && measure == "oeRatio"){ // removing as metamisc's link function is broken for frequentist option: method.value == "Fixed Effects" || method.value == "Maximum Likelihood" || + values: if (analysisType == "bayesian" && measure == "oeRatio"){ // removing as metamisc's link function is broken for frequentist option: method.value == "Fixed Effects" || method.value == "Maximum Likelihood" || [ { label: qsTr("Normal/Log"), value: "normal/log" }, { label: qsTr("Normal/Identity"), value: "normal/identity" }, { label: qsTr("Poisson/Log"), value: "poisson/log" } ] - } else { + } else if (measure == "oeRatio"){ [ { label: qsTr("Normal/Log"), value: "normal/log" }, { label: qsTr("Normal/Identity"), value: "normal/identity" } ] + } else { + [ + { label: qsTr("Normal/Logit"), value: "normal/logit" }, + { label: qsTr("Normal/Identity"), value: "normal/identity" } + ] } } }