Skip to content

Commit

Permalink
change flipped signs to none and move ignore-structural checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
juliuspfadt committed Feb 20, 2024
1 parent b13e588 commit 4ca048b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 28 deletions.
8 changes: 2 additions & 6 deletions R/plssem.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ checkCSemModel <- function(model, availableVars) {
modelContainer$dependOn(c("correlationMatrix", "convergenceCriterion",
"estimateStructural", "group", "correctionFactor", "consistentPartialLeastSquares",
"structuralModelIgnored", "innerWeightingScheme", "errorCalculationMethod", "robustMethod", "bootstrapSamples", "ciLevel",
"setSeed", "seed", "handlingOfInadmissibles", "Data", "handlingOfFlippedSigns", "endogenousIndicatorPrediction",
"setSeed", "seed", "handlingOfInadmissibles", "Data", "endogenousIndicatorPrediction",
"kFolds", "repetitions", "benchmark", "predictedScore"))
jaspResults[["modelContainer"]] <- modelContainer
}
Expand Down Expand Up @@ -236,11 +236,7 @@ checkCSemModel <- function(model, availableVars) {
.user_funs = tickFunction,
.resample_method = options[["robustMethod"]],
.handle_inadmissibles = options[["handlingOfInadmissibles"]],
.sign_change_option = switch(options[["handlingOfFlippedSigns"]],
"individualReestimation" = "individual_reestimate",
"constructReestimation" = "construct_reestimate",
options[["handlingOfFlippedSigns"]]
),
.sign_change_option = "none",
.seed = if (options[["setSeed"]]) options[["seed"]]))


Expand Down
25 changes: 7 additions & 18 deletions inst/qml/PLSSEM.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ Form

Group
{
CheckBox
{
enabled: approachWeigths.currentValue == "PLS-PM" && approachInner.currentValue != "path"
name: "structuralModelIgnored"
label: qsTr("Ignore structural model")
}

CheckBox
{
Expand Down Expand Up @@ -146,6 +140,13 @@ Form
]
}

CheckBox
{
enabled: approachInner.currentValue != "path"
name: "structuralModelIgnored"
label: qsTr("Ignore structural model")
}

DropDown
{
name: "convergenceCriterion"
Expand Down Expand Up @@ -173,18 +174,6 @@ Form
RadioButton { value: "ignore"; label: qsTr("Ignore") }
RadioButton { value: "drop"; label: qsTr("Drop") }
}

DropDown
{
name: "handlingOfFlippedSigns"
label: qsTr("Handling of flipped signs")
values: [
{ value: "none", label: qsTr("None") },
{ value: "individual", label: qsTr("Individual") },
{ value: "individualReestimation", label: qsTr("Individual re-estimation") },
{ value: "constructReestimation", label: qsTr("Construct re-estimation") }
]
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/test-plssem.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ test_that("Basic PLSSEM works", {
options$innerWeightingScheme <- "path"
options$convergenceCriterion <- "absoluteDifference"
options$correctionFactor <- "squaredEuclidean"
options$handlingOfFlippedSigns <- "none"


results <- jaspTools::runAnalysis("PLSSEM", "poldem_grouped.csv", options)
Expand Down Expand Up @@ -93,7 +92,6 @@ test_that("Multigroup, multimodel PLSSEM works", {
options$observedIndicatorCorrelation <- TRUE
options$innerWeightingScheme <- "centroid"
options$structuralModelIgnored <- TRUE
options$handlingOfFlippedSigns <- "none"

results <- jaspTools::runAnalysis("PLSSEM", "poldem_grouped.csv", options)

Expand Down Expand Up @@ -290,7 +288,6 @@ test_that("Bootstrapping works", {
options$robustMethod <- "bootstrap"
options$bootstrapSamples <- 200
options$handlingOfInadmissibles <- "ignore"
options$handlingOfFlippedSigns <- "none"

set.seed(123)
results <- jaspTools::runAnalysis("PLSSEM", "poldem_grouped.csv", options)
Expand Down Expand Up @@ -405,7 +402,6 @@ test_that("cSEM example matches output", {
options$innerWeightingScheme <- "path"
options$convergenceCriterion <- "absoluteDifference"
options$correctionFactor <- "squaredEuclidean"
options$handlingOfFlippedSigns <- "none"
options$additionalFitMeasures <- TRUE
options$rSquared <- TRUE
options$mardiasCoefficient <- TRUE
Expand Down

0 comments on commit 4ca048b

Please sign in to comment.