diff --git a/R/bayesiannetworkanalysis.R b/R/bayesiannetworkanalysis.R index dabf222..f6e20d3 100644 --- a/R/bayesiannetworkanalysis.R +++ b/R/bayesiannetworkanalysis.R @@ -41,7 +41,9 @@ BayesianNetworkAnalysis <- function(jaspResults, dataset, options) { mainContainer <- jaspResults[["mainContainer"]] if (is.null(mainContainer)) { mainContainer <- createJaspContainer(dependencies = c("variables", "groupingVariable", "model", - "burnin", "iter", "gprior", "dfprior")) + "burnin", "iter", "gprior", "dfprior", "initialConfiguration", + "edgePrior", "interactionScale", "beta_alpha", "beta_beta", + "dirichlet_alpha", "threshold_alpha", "threshold_beta")) jaspResults[["mainContainer"]] <- mainContainer } .bayesianNetworkAnalysisMainTableMeta(mainContainer, dataset, options) @@ -303,7 +305,12 @@ BayesianNetworkAnalysis <- function(jaspResults, dataset, options) { burnin = as.numeric(options[["burnin"]]), inclusion_probability = as.numeric(options[["gprior"]]), interaction_scale = as.numeric(options[["interactionScale"]]), - edge_prior = as.character(options[["edgePrior"]]))) + edge_prior = as.character(options[["edgePrior"]]), + threshold_alpha = as.numeric(options[["threshold_alpha"]]), + threshold_beta = as.numeric(options[["threshold_beta"]]), + beta_bernoulli_alpha = as.numeric(options[["beta_alpha"]]), + beta_bernoulli_beta = as.numeric(options[["beta_beta"]]), + dirichlet_alpha = as.numeric(options[["dirichlet_alpha"]]))) } } diff --git a/inst/qml/BayesianNetworkAnalysis.qml b/inst/qml/BayesianNetworkAnalysis.qml index 9724dc1..c424b71 100644 --- a/inst/qml/BayesianNetworkAnalysis.qml +++ b/inst/qml/BayesianNetworkAnalysis.qml @@ -108,7 +108,7 @@ Section { anchors.fill: parent Group { - title: qsTr("Network/Edge Priors") + title: qsTr("Network Structure (Edge) Priors") Layout.fillWidth: true Column { @@ -138,6 +138,33 @@ Section { ] } + FormulaField { + name: "beta_alpha" + label: qsTr("Shape parameter 1:") + value: "1" + min: 0.001 + Layout.fillWidth: true + preferredWidth: 300 + } + + FormulaField { + name: "beta_beta" + label: qsTr("Shape parameter 2:") + value: "1" + min: 0.001 + Layout.fillWidth: true + preferredWidth: 300 + } + + FormulaField { + name: "dirichlet_alpha" + label: qsTr("Concentration parameter:") + value: "1" + min: 0.001 + Layout.fillWidth: true + preferredWidth: 300 + } + DropDown { id: initialConfiguration name: "initialConfiguration" @@ -149,11 +176,30 @@ Section { { value: "full", label: "full" } ] } + + + FormulaField { + name: "beta_bernoulli_alpha" + label: qsTr("Shape parameter 1:") + value: "1" + min: 0.001 + Layout.fillWidth: true + preferredWidth: 300 + } + + FormulaField { + name: "beta_bernoulli_beta" + label: qsTr("Shape parameter 2:") + value: "1" + min: 0.001 + Layout.fillWidth: true + preferredWidth: 300 + } } } Group { - title: qsTr("Edge Weight Priors") + title: qsTr("Parameter Priors") Layout.fillWidth: true Column { @@ -171,10 +217,28 @@ Section { FormulaField { name: "interactionScale" - label: qsTr("Scale of the Cauchy distribution (for omrf):") + label: qsTr("Scale of the Cauchy distribution for the edge weights (for omrf):") value: "2.5" min: 0.1 - max: 10 + Layout.fillWidth: true + preferredWidth: 300 + } + + + FormulaField { + name: "threshold_alpha" + label: qsTr("Threshold Shape parameter 1:") + value: "1" + min: 0.001 + Layout.fillWidth: true + preferredWidth: 300 + } + + FormulaField { + name: "threshold_beta" + label: qsTr("Threshold shape parameter 2:") + value: "1" + min: 0.001 Layout.fillWidth: true preferredWidth: 300 }