Skip to content

Commit a8749c8

Browse files
committed
remove jackknife
1 parent 534c3e1 commit a8749c8

File tree

3 files changed

+15
-31
lines changed

3 files changed

+15
-31
lines changed

R/plssem.R

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ checkCSemModel <- function(model, availableVars) {
159159
modelContainer$dependOn(c("syntax", "convergenceCriterion",
160160
"estimateStructural", "group", "consistentPartialLeastSquares",
161161
"structuralModelIgnored", "innerWeightingScheme", "errorCalculationMethod",
162-
"robustMethod", "bootstrapSamples", "ciLevel",
162+
"bootstrapSamples", "ciLevel",
163163
"setSeed", "seed", "handlingOfInadmissibles", "endogenousIndicatorPrediction",
164164
"kFolds", "repetitions", "benchmark", "predictedScore", "models"))
165165
jaspResults[["modelContainer"]] <- modelContainer
@@ -220,14 +220,10 @@ checkCSemModel <- function(model, availableVars) {
220220
break
221221
}
222222

223-
# resample if robust/ bootstrap
224-
if (options[["errorCalculationMethod"]] == "robust") {
223+
# resample if bootstrap
224+
if (options[["errorCalculationMethod"]] == "bootstrap") {
225225

226-
if(options[["robustMethod"]] == "bootstrap") {
227-
startProgressbar(options[["bootstrapSamples"]], "Resampling")
228-
} else {
229-
startProgressbar(nrow(dataset), "Resampling")
230-
}
226+
startProgressbar(options[["bootstrapSamples"]], "Resampling")
231227

232228
# argument .user_funs in cSEM::resamplecSEMResults only accepts a function with .object as input and a vector as output; c(0,0) does not have any other function
233229
tickFunction <- function(.object)
@@ -239,7 +235,7 @@ checkCSemModel <- function(model, availableVars) {
239235
fit <- try(cSEM::resamplecSEMResults(.object = fit,
240236
.R = options[["bootstrapSamples"]],
241237
.user_funs = tickFunction,
242-
.resample_method = options[["robustMethod"]],
238+
.resample_method = "bootstrap",
243239
.handle_inadmissibles = options[["handlingOfInadmissibles"]],
244240
.sign_change_option = "none",
245241
.seed = if (options[["setSeed"]]) options[["seed"]]))

inst/qml/PLSSEM.qml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,7 @@ Form
113113
name: "errorCalculationMethod"
114114
id: errorCalcMethod
115115
RadioButton { value: "none"; label: qsTr("None"); checked: true }
116-
RadioButton
117-
{
118-
value: "robust";
119-
label: qsTr("Robust")
120-
RadioButtonGroup
121-
{
122-
title: ""
123-
name: "robustMethod"
124-
RadioButton {
116+
RadioButton {
125117
value: "bootstrap"; label: qsTr("Bootstrap"); checked: true
126118
IntegerField
127119
{
@@ -132,16 +124,14 @@ Form
132124
min: 1
133125
// enabled: errorCalcMethod.value == "robust"
134126
}
127+
CIField
128+
{
129+
text: qsTr("Confidence intervals")
130+
name: "ciLevel"
131+
enabled: errorCalcMethod.value == "bootstrap"
132+
}
135133
}
136-
RadioButton { value: "jackknife"; label: qsTr("Jackknife") }
137-
}
138-
139-
CIField
140-
{
141-
text: qsTr("Confidence intervals")
142-
name: "ciLevel"
143-
enabled: errorCalcMethod.value == "robust"
144-
}
134+
145135
}
146136
}
147137
RadioButtonGroup

tests/testthat/test-plssem.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,7 @@ test_that("1 table results match", {
368368
options$convergenceCriterion <- "absoluteDifference"
369369
options$setSeed <- TRUE
370370
options$seed <- 123
371-
options$errorCalculationMethod <- "robust"
372-
options$robustMethod <- "bootstrap"
371+
options$errorCalculationMethod <- "bootstrap"
373372
options$bootstrapSamples <- 200
374373
options$handlingOfInadmissibles <- "ignore"
375374

@@ -603,8 +602,7 @@ options$innerWeightingScheme <- "path"
603602
options$convergenceCriterion <- "absoluteDifference"
604603
options$setSeed <- TRUE
605604
options$seed <- 123
606-
options$errorCalculationMethod <- "robust"
607-
options$robustMethod <- "bootstrap"
605+
options$errorCalculationMethod <- "bootstrap"
608606
options$bootstrapSamples <- 200
609607
options$handlingOfInadmissibles <- "ignore"
610608
options$handlingOfFlippedSigns <- "none"

0 commit comments

Comments
 (0)