Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions R/JAGSWrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ JAGS <- function(
bivariateScatterPlot = FALSE,
burnin = 500,
chains = 3,
colorScheme = "colorblind",
colorPalette = "colorblind",
customInference = list(list(ciLevel = 0.95, data = "", dataSplit = "", ess = TRUE, hdiLevel = 0.95, inferenceCi = FALSE, inferenceCiLevel = 0.95, inferenceCustomHigh = "1", inferenceCustomLow = "0", inferenceHdi = FALSE, inferenceHdiLevel = 0.95, inferenceManual = FALSE, mean = TRUE, median = TRUE, name = "Plot 1", overlayGeomType = "density", overlayHistogramBinWidthType = "sturges", overlayHistogramManualNumberOfBins = 30, parameter = "", parameterOrder = "orderMean", parameterSubset = "", plotCustomHigh = "1", plotCustomLow = "0", plotInterval = "ci", plotsType = "", rhat = TRUE, savageDickey = FALSE, savageDickeyPoint = "0", savageDickeyPosteriorMethod = "samplingPosteriorPoint", savageDickeyPosteriorSamplingType = "normalKernel", savageDickeyPriorHeight = "0", savageDickeyPriorMethod = "sampling", savageDickeySamplingType = "normalKernel", sd = TRUE, shadeIntervalInPlot = FALSE)),
densityPlot = FALSE,
deviance = FALSE,
Expand Down Expand Up @@ -64,7 +64,7 @@ JAGS <- function(
options[["data"]] <- NULL
options[["version"]] <- NULL

optionsWithFormula <- c("colorScheme", "customInference", "initialValues", "model", "monitoredParameters", "monitoredParametersShown", "userData")
optionsWithFormula <- c("colorPalette", "customInference", "initialValues", "model", "monitoredParameters", "monitoredParametersShown", "userData")
for (name in optionsWithFormula) {
if ((name %in% optionsWithFormula) && inherits(options[[name]], "formula")) options[[name]] = jaspBase::jaspFormula(options[[name]], data) }

Expand Down
4 changes: 2 additions & 2 deletions R/jagsModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ JAGSInternal <- function(jaspResults, dataset, options, state = NULL) {
.JAGSmcmcPlots <- function(jaspResults, options, mcmcResult) {

if (is.null(jaspResults[["mainContainer"]][["plotContainer"]])) {
plotContainer <- createJaspContainer(dependencies = c("monitoredParametersShown", "colorScheme"))
plotContainer <- createJaspContainer(dependencies = c("monitoredParametersShown", "colorPalette"))
} else {
plotContainer <- jaspResults[["mainContainer"]][["plotContainer"]]
}
Expand All @@ -401,7 +401,7 @@ JAGSInternal <- function(jaspResults, dataset, options, state = NULL) {
if (is.null(jaspResults[["mainContainer"]][["plotContainer"]]))
jaspResults[["mainContainer"]][["plotContainer"]] <- plotContainer

colorpalette <- options[["colorScheme"]]
colorpalette <- options[["colorPalette"]]
oldColorpalette <- jaspGraphs::getGraphOption("palette")
on.exit(jaspGraphs::setGraphOption("palette", oldColorpalette))
jaspGraphs::setGraphOption("palette", colorpalette)
Expand Down
17 changes: 2 additions & 15 deletions inst/qml/JAGS.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Form
}
AssignedVariablesList { name: "monitoredParametersShown"; title: qsTr("Show results for these parameters")}
}

Section
{
title: qsTr("Observed Values")
Expand All @@ -73,20 +73,7 @@ Form
title: qsTr("Plots")
Group
{
DropDown
{
name: "colorScheme"
indexDefaultValue: 0
label: qsTr("Color scheme for plots:")
values:
[
{ label: qsTr("Colorblind"), value: "colorblind" },
{ label: qsTr("Colorblind Alt."), value: "colorblind2" },
{ label: qsTr("Viridis"), value: "viridis" },
{ label: qsTr("Blue"), value: "blue" },
{ label: qsTr("Gray"), value: "gray" }
]
}
ColorPalette{}
CheckBox { name: "aggregatedChains"; label: qsTr("Aggregate chains for densities and histograms"); checked:true }
CheckBox { name: "legend"; label: qsTr("Show legends"); checked:true }
CheckBox { name: "densityPlot"; label: qsTr("Density") }
Expand Down