Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix for RoBMA #196

Merged
merged 4 commits into from
Sep 18, 2023
Merged
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
29 changes: 19 additions & 10 deletions R/robustbayesianmetaanalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU

### create overview table
modelsSummary <- createJaspTable(title = gettext("Models Overview"))
modelsSummary$position <- 6
modelsSummary$position <- 8
modelsSummary$dependOn(c(.robmaDependencies, "bayesFactorType", "inferenceModelsOverview", "inferenceModelsOverviewBF", "inferenceModelsOverviewOrder", "inferenceShortenPriorName"))
jaspResults[["mainSummary"]][["modelsSummary"]] <- modelsSummary

Expand Down Expand Up @@ -1032,7 +1032,7 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
return()
} else {
individualModels <- createJaspContainer(title = gettext("Individual Models Summary"))
individualModels$position <- 5
individualModels$position <- 9
individualModels$dependOn(c(.robmaDependencies, "bayesFactorType", "inferenceIndividualModels", "inferenceIndividualModelsSingleModel", "inferenceIndividualModelsSingleModelNumber", "inferenceShortenPriorName", "inferenceOutputScale"))
jaspResults[["individualModels"]] <- individualModels
}
Expand Down Expand Up @@ -1193,7 +1193,7 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
width <- 800

forestPlot <- createJaspPlot(title = title, width = width, height = height)
forestPlot$position <- 6
forestPlot$position <- 10
forestPlot$dependOn(c(.robmaDependencies, "plotsForestPlot", "plotsForestPlotOrder", "plotsForestPlotType", "inferenceOutputScale"))
jaspResults[["forestPlot"]] <- forestPlot

Expand Down Expand Up @@ -1222,7 +1222,7 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
# create / access the container
if (is.null(jaspResults[["estimatesPlots"]])) {
estimatesPlots <- createJaspContainer(title = gettext("Posterior Distribution Plots"))
estimatesPlots$position <- 7
estimatesPlots$position <- 11
estimatesPlots$dependOn(c(.robmaDependencies, "plotsPooledEstimatesType", "plotsPooledEstimatesPriorDistribution", "inferenceOutputScale"))
jaspResults[["estimatesPlots"]] <- estimatesPlots
} else {
Expand Down Expand Up @@ -1306,7 +1306,7 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
# create / access the container
if (is.null(jaspResults[["modelsPlots"]])) {
modelsPlots <- createJaspContainer(title = gettext("Posterior Model Estimates Plots"))
modelsPlots$position <- 8
modelsPlots$position <- 12
modelsPlots$dependOn(c(.robmaDependencies, "plotsIndividualModelsType", "plotsIndividualModelsOrder", "plotsIndividualModelsOrderBy", "plotsIndividualModelsShowBayesianUpdating", "plotsIndividualModelsShowPosteriorEstimates", "inferenceOutputScale"))
jaspResults[["modelsPlots"]] <- modelsPlots
} else {
Expand Down Expand Up @@ -1394,7 +1394,7 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
# create / access the container
if (is.null(jaspResults[["diagnostics"]])) {
diagnostics <- createJaspContainer(title = gettext("Diagnostics"))
diagnostics$position <- 9
diagnostics$position <- 13
diagnostics$dependOn(.robmaDependencies)
jaspResults[["diagnostics"]] <- diagnostics
} else {
Expand Down Expand Up @@ -1457,7 +1457,7 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
# create / access the container
if (is.null(jaspResults[["diagnostics"]])) {
diagnostics <- createJaspContainer(title = gettext("Diagnostics"))
diagnostics$position <- 9
diagnostics$position <- 14
diagnostics$dependOn(.robmaDependencies)
jaspResults[["diagnostics"]] <- diagnostics
} else {
Expand Down Expand Up @@ -1576,7 +1576,10 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
title = FALSE
)

if (is.null(newPlots))
# (temporal) fix for the package returning a list with empty plots on the remaining spots
newPlots <- newPlots[!sapply(newPlots, is.null)]

if (length(newPlots) == 0)
next

noPars <- FALSE
Expand Down Expand Up @@ -1620,7 +1623,10 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
title = FALSE
)

if (is.null(newPlots))
# (temporal) fix for the package returning a list with empty plots on the remaining spots
newPlots <- newPlots[!sapply(newPlots, is.null)]

if (length(newPlots) == 0)
next

noPars <- FALSE
Expand Down Expand Up @@ -1665,7 +1671,10 @@ RobustBayesianMetaAnalysis <- function(jaspResults, dataset, options, state = NU
title = FALSE
)

if (is.null(newPlots))
# (temporal) fix for the package returning a list with empty plots on the remaining spots
newPlots <- newPlots[!sapply(newPlots, is.null)]

if (length(newPlots) == 0)
next

noPars <- FALSE
Expand Down
4 changes: 2 additions & 2 deletions inst/qml/RobustBayesianMetaAnalysis.qml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ Form
{ label: qsTr("Cohen's d"), value: "cohensD"},
{ label: qsTr("Fisher's z"), value: "fishersZ"},
{ label: qsTr("logOR"), value: "logOr"},
{ label: qsTr("Correlation"), value: "r"}
{ label: qsTr("Correlation"), value: "correlation"}
]
}

Expand Down Expand Up @@ -578,7 +578,7 @@ Form

RadioButtonGroup
{
name: "plotsIndividualModelsOrderelsOrderBy"
name: "plotsIndividualModelsOrder"
title: qsTr("Order")

RadioButton
Expand Down
Loading