From b9ded7711a094a82d7da62b5b0053c6eba95f6c6 Mon Sep 17 00:00:00 2001 From: boutinb Date: Tue, 5 Nov 2024 10:16:01 +0100 Subject: [PATCH] Update wrappers --- R/correlationWrapper.R | 8 ++++---- R/correlationbayesianWrapper.R | 6 +++--- R/generalizedlinearmodelWrapper.R | 18 +++++++++--------- R/regressionlinearWrapper.R | 14 +++++++------- R/regressionlinearbayesianWrapper.R | 12 ++++++------ R/regressionlogisticWrapper.R | 14 +++++++------- R/regressionlogisticbayesianWrapper.R | 14 +++++++------- inst/qml/RegressionLinear.qml | 7 ------- inst/qml/RegressionLogistic.qml | 7 ------- 9 files changed, 43 insertions(+), 57 deletions(-) diff --git a/R/correlationWrapper.R b/R/correlationWrapper.R index 47008778..4d98bc3d 100755 --- a/R/correlationWrapper.R +++ b/R/correlationWrapper.R @@ -1,5 +1,5 @@ # -# Copyright (C) 2013-2022 University of Amsterdam +# Copyright (C) 2013-2024 University of Amsterdam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ Correlation <- function( data = NULL, - version = "0.19", + version = "0.19.2", alternative = "twoSided", assumptionCheckMultivariateEnergy = FALSE, assumptionCheckMultivariateMardia = FALSE, @@ -41,7 +41,7 @@ Correlation <- function( meansAndSd = FALSE, naAction = "pairwise", pairwiseDisplay = FALSE, - partialOutVariables = list(), + partialOutVariables = list(types = list(), value = NULL), pearson = TRUE, plotHeight = 320, plotWidth = 480, @@ -56,7 +56,7 @@ Correlation <- function( significanceFlagged = FALSE, significanceReport = TRUE, spearman = FALSE, - variables = list(), + variables = list(types = list(), value = NULL), vovkSellke = FALSE) { defaultArgCalls <- formals(jaspRegression::Correlation) diff --git a/R/correlationbayesianWrapper.R b/R/correlationbayesianWrapper.R index b1c8871b..5305a71b 100755 --- a/R/correlationbayesianWrapper.R +++ b/R/correlationbayesianWrapper.R @@ -1,5 +1,5 @@ # -# Copyright (C) 2013-2022 University of Amsterdam +# Copyright (C) 2013-2024 University of Amsterdam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ CorrelationBayesian <- function( data = NULL, - version = "0.19", + version = "0.19.2", alternative = "twoSided", bayesFactorReport = TRUE, bayesFactorType = "BF10", @@ -52,7 +52,7 @@ CorrelationBayesian <- function( spearman = FALSE, supportCorrelationFlagged = FALSE, variablePairs = list(), - variables = list()) { + variables = list(types = list(), value = NULL)) { defaultArgCalls <- formals(jaspRegression::CorrelationBayesian) defaultArgs <- lapply(defaultArgCalls, eval) diff --git a/R/generalizedlinearmodelWrapper.R b/R/generalizedlinearmodelWrapper.R index 1fd4c09b..352754b3 100644 --- a/R/generalizedlinearmodelWrapper.R +++ b/R/generalizedlinearmodelWrapper.R @@ -1,5 +1,5 @@ # -# Copyright (C) 2013-2022 University of Amsterdam +# Copyright (C) 2013-2024 University of Amsterdam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ GeneralizedLinearModel <- function( data = NULL, - version = "0.19", + version = "0.19.2", formula = NULL, isNuisance = NULL, coefficientCi = FALSE, @@ -27,15 +27,15 @@ GeneralizedLinearModel <- function( coefficientEstimate = TRUE, contrasts = list(), covarianceRatio = FALSE, - covariates = list(), - dependent = "", + covariates = list(types = list(), value = NULL), + dependent = list(types = list(), value = ""), devianceGoodnessOfFit = FALSE, devianceResidualQqPlot = FALSE, devianceResidualVsFittedPlot = FALSE, devianceResidualVsPredictorPlot = FALSE, dfbetas = FALSE, dffits = FALSE, - factors = list(), + factors = list(types = list(), value = NULL), family = "bernoulli", interceptTerm = TRUE, leverage = FALSE, @@ -49,9 +49,9 @@ GeneralizedLinearModel <- function( marginalMeansPAdjustment = "holm", marginalMeansResponse = TRUE, marginalMeansSd = 1, - marginalMeansVars = list(), - modelTerms = list(), - offset = "", + marginalMeansVars = list(types = list(), value = NULL), + modelTerms = list(optionKey = "components", types = list(), value = list()), + offset = list(types = list(), value = ""), otherGlmModel = "multinomialLogistic", partialResidualPlot = FALSE, pearsonGoodnessOfFit = FALSE, @@ -80,7 +80,7 @@ GeneralizedLinearModel <- function( studentizedResidualOutlierTableTopN = 3, tolerance = FALSE, vif = FALSE, - weights = "", + weights = list(types = list(), value = ""), workingResponseVsLinearPredictorPlot = FALSE) { defaultArgCalls <- formals(jaspRegression::GeneralizedLinearModel) diff --git a/R/regressionlinearWrapper.R b/R/regressionlinearWrapper.R index b2f5327a..60ff9cda 100755 --- a/R/regressionlinearWrapper.R +++ b/R/regressionlinearWrapper.R @@ -1,5 +1,5 @@ # -# Copyright (C) 2013-2022 University of Amsterdam +# Copyright (C) 2013-2024 University of Amsterdam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ RegressionLinear <- function( data = NULL, - version = "0.19", + version = "0.19.2", formula = NULL, isNuisance = NULL, coefficientBootstrap = FALSE, @@ -31,13 +31,13 @@ RegressionLinear <- function( collinearityStatistic = FALSE, covarianceMatrix = FALSE, covarianceRatio = FALSE, - covariates = list(), - dependent = "", + covariates = list(types = list(), value = NULL), + dependent = list(types = list(), value = ""), descriptives = FALSE, dfbetas = FALSE, dffits = FALSE, fChange = FALSE, - factors = list(), + factors = list(types = list(), value = NULL), interceptTerm = TRUE, leverage = FALSE, mahalanobis = FALSE, @@ -49,7 +49,7 @@ RegressionLinear <- function( method = "enter", modelAICBIC = FALSE, modelFit = TRUE, - modelTerms = list(list(components = list(), name = "model0", title = "Model 0"), list(components = list(), name = "model1", title = "Model 1")), + modelTerms = list(list(components = list(), name = "model0", title = "Model 0", types = list()), list(components = list(), name = "model1", title = "Model 1", types = list())), naAction = "listwise", nested = TRUE, partAndPartialCorrelation = FALSE, @@ -81,7 +81,7 @@ RegressionLinear <- function( steppingMethodCriteriaPRemoval = 0.1, steppingMethodCriteriaType = "pValue", vovkSellke = FALSE, - weights = "") { + weights = list(types = list(), value = "")) { defaultArgCalls <- formals(jaspRegression::RegressionLinear) defaultArgs <- lapply(defaultArgCalls, eval) diff --git a/R/regressionlinearbayesianWrapper.R b/R/regressionlinearbayesianWrapper.R index 075a7677..f9ae939a 100755 --- a/R/regressionlinearbayesianWrapper.R +++ b/R/regressionlinearbayesianWrapper.R @@ -1,5 +1,5 @@ # -# Copyright (C) 2013-2022 University of Amsterdam +# Copyright (C) 2013-2024 University of Amsterdam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ RegressionLinearBayesian <- function( data = NULL, - version = "0.19", + version = "0.19.2", formula = NULL, isNuisance = NULL, bayesFactorOrder = "bestModelTop", @@ -28,8 +28,8 @@ RegressionLinearBayesian <- function( betaBinomialParamA = 1, betaBinomialParamB = 1, castilloParamU = 1, - covariates = list(), - dependent = "", + covariates = list(types = list(), value = NULL), + dependent = list(types = list(), value = ""), descriptives = FALSE, effectsType = "allModels", gPriorAlpha = 3, @@ -40,7 +40,7 @@ RegressionLinearBayesian <- function( modelComplexityPlot = FALSE, modelPrior = "betaBinomial", modelProbabilitiesPlot = FALSE, - modelTerms = list(), + modelTerms = list(optionKey = "components", types = list(), value = list()), modelsShown = "limited", numModelsShown = 10, numberOfModels = 0, @@ -63,7 +63,7 @@ RegressionLinearBayesian <- function( seed = 1, setSeed = FALSE, summaryType = "averaged", - weights = "", + weights = list(types = list(), value = ""), wilsonParamLambda = 1) { defaultArgCalls <- formals(jaspRegression::RegressionLinearBayesian) diff --git a/R/regressionlogisticWrapper.R b/R/regressionlogisticWrapper.R index cd72dea7..14b2980b 100755 --- a/R/regressionlogisticWrapper.R +++ b/R/regressionlogisticWrapper.R @@ -1,5 +1,5 @@ # -# Copyright (C) 2013-2022 University of Amsterdam +# Copyright (C) 2013-2024 University of Amsterdam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ RegressionLogistic <- function( data = NULL, - version = "0.19", + version = "0.19.2", formula = NULL, isNuisance = NULL, accuracy = FALSE, @@ -37,13 +37,13 @@ RegressionLogistic <- function( conditionalEstimatePlotPoints = FALSE, confusionMatrix = FALSE, covarianceRatio = FALSE, - covariates = list(), - dependent = "", + covariates = list(types = list(), value = NULL), + dependent = list(types = list(), value = ""), descriptives = FALSE, dfbetas = FALSE, dffits = FALSE, fMeasure = FALSE, - factors = list(), + factors = list(types = list(), value = NULL), hMeasure = FALSE, independentVsPredictedPlot = FALSE, independentVsPredictedPlotIncludeInteractions = TRUE, @@ -52,7 +52,7 @@ RegressionLogistic <- function( leverage = FALSE, mahalanobis = FALSE, method = "enter", - modelTerms = list(list(components = list(), name = "model0", title = "Model 0"), list(components = list(), name = "model1", title = "Model 1")), + modelTerms = list(list(components = list(), name = "model0", title = "Model 0", types = list()), list(components = list(), name = "model1", title = "Model 1", types = list())), multicollinearity = FALSE, nested = TRUE, oddsRatio = FALSE, @@ -80,7 +80,7 @@ RegressionLogistic <- function( specificity = FALSE, squaredPearsonResidualVsFittedPlot = FALSE, vovkSellke = FALSE, - weights = "") { + weights = list(types = list(), value = "")) { defaultArgCalls <- formals(jaspRegression::RegressionLogistic) defaultArgs <- lapply(defaultArgCalls, eval) diff --git a/R/regressionlogisticbayesianWrapper.R b/R/regressionlogisticbayesianWrapper.R index 538d985b..a80ef032 100644 --- a/R/regressionlogisticbayesianWrapper.R +++ b/R/regressionlogisticbayesianWrapper.R @@ -1,5 +1,5 @@ # -# Copyright (C) 2013-2022 University of Amsterdam +# Copyright (C) 2013-2024 University of Amsterdam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ RegressionLogisticBayesian <- function( data = NULL, - version = "0.19", + version = "0.19.2", bayesFactorOrder = "bestModelTop", bayesFactorType = "BF10", bernoulliParam = 0.5, @@ -29,11 +29,11 @@ RegressionLogisticBayesian <- function( cchPriorAlpha = 0.5, cchPriorBeta = 2, cchPriorS = 0, - covariates = list(), - dependent = "", + covariates = list(types = list(), value = NULL), + dependent = list(types = list(), value = ""), descriptives = FALSE, effectsType = "allModels", - factors = list(), + factors = list(types = list(), value = NULL), gPriorAlpha = 3, inclusionProbabilitiesPlot = FALSE, logPosteriorOddsPlot = FALSE, @@ -41,7 +41,7 @@ RegressionLogisticBayesian <- function( modelComplexityPlot = FALSE, modelPrior = "betaBinomial", modelProbabilitiesPlot = FALSE, - modelTerms = list(), + modelTerms = list(optionKey = "components", types = list(), value = list()), modelsShown = "limited", numModelsShown = 10, numberOfModels = 0, @@ -64,7 +64,7 @@ RegressionLogisticBayesian <- function( seed = 1, setSeed = FALSE, summaryType = "averaged", - weights = "", + weights = list(types = list(), value = ""), wilsonParamLambda = 1) { defaultArgCalls <- formals(jaspRegression::RegressionLogisticBayesian) diff --git a/inst/qml/RegressionLinear.qml b/inst/qml/RegressionLinear.qml index f55f7bd2..cf7162e7 100644 --- a/inst/qml/RegressionLinear.qml +++ b/inst/qml/RegressionLinear.qml @@ -27,13 +27,6 @@ Form property int analysis: Common.Type.Analysis.LinearRegression property int framework: Common.Type.Framework.Classical - Formula - { - lhs: "dependent" - rhs: [{ name: "modelTerms", extraOptions: "isNuisance" }] - userMustSpecify: "covariates" - } - VariablesForm { AvailableVariablesList { name: "allVariablesList" } diff --git a/inst/qml/RegressionLogistic.qml b/inst/qml/RegressionLogistic.qml index 88ec025b..40883dda 100644 --- a/inst/qml/RegressionLogistic.qml +++ b/inst/qml/RegressionLogistic.qml @@ -25,13 +25,6 @@ Form plotWidth: 480 plotHeight: 320 - Formula - { - lhs: "dependent" - rhs: [{ name: "modelTerms", extraOptions: "isNuisance" }] - userMustSpecify: "covariates" - } - VariablesForm { AvailableVariablesList { name: "allVariablesList" }