Skip to content

Commit

Permalink
Update wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
boutinb committed Nov 5, 2024
1 parent 3711278 commit 2ad242a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
18 changes: 10 additions & 8 deletions R/confirmatoryfactoranalysisWrapper.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2013-2022 University of Amsterdam
# Copyright (C) 2013-2024 University of Amsterdam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -19,19 +19,20 @@

confirmatoryFactorAnalysis <- function(
data = NULL,
version = "0.19",
version = "0.19.2",
ave = FALSE,
bartlettTest = FALSE,
bootstrapSamples = 1000,
ciLevel = 0.95,
dataType = "raw",
dependentVariablesCorrelated = TRUE,
estimator = "default",
exogenousCovariatesFixed = TRUE,
exogenousLatentsCorrelated = TRUE,
factors = list(list(indicators = list(), name = "Factor1", title = "Factor 1")),
factorsUncorrelated = FALSE,
fitMeasures = FALSE,
group = "",
group = list(types = "unknown", value = ""),
htmt = FALSE,
impliedCovarianceMatrix = FALSE,
interceptsFixedToZero = "latent",
Expand All @@ -42,10 +43,10 @@ confirmatoryFactorAnalysis <- function(
manifestInterceptsFixedToZero = FALSE,
meanStructure = FALSE,
misfitPlot = FALSE,
modelIdentification = "factorVariance",
modelIdentification = "markerVariable",
modificationIndices = FALSE,
modificationIndicesCutoff = 3.84,
naAction = "fiml",
naAction = "listwise",
packageMimiced = "lavaan",
pathPlot = FALSE,
pathPlotFontSize = 0.9,
Expand All @@ -62,9 +63,10 @@ confirmatoryFactorAnalysis <- function(
residualSingleIndicatorOmitted = TRUE,
residualVariances = TRUE,
residualsCovarying = list(),
sampleSize = 200,
scalingParamaters = TRUE,
seType = "standard",
secondOrder = list(),
seType = "default",
secondOrder = list(types = list(), value = NULL),
standardized = "none",
thresholds = TRUE) {

Expand All @@ -77,7 +79,7 @@ confirmatoryFactorAnalysis <- function(
options[["data"]] <- NULL
options[["version"]] <- NULL

optionsWithFormula <- c("factors", "group", "invarianceTesting", "modelIdentification", "naAction", "residualsCovarying", "secondOrder")
optionsWithFormula <- c("estimator", "factors", "group", "invarianceTesting", "modelIdentification", "naAction", "packageMimiced", "residualsCovarying", "seType", "secondOrder")
for (name in optionsWithFormula) {
if ((name %in% optionsWithFormula) && inherits(options[[name]], "formula")) options[[name]] = jaspBase::jaspFormula(options[[name]], data) }

Expand Down
10 changes: 7 additions & 3 deletions R/exploratoryfactoranalysisWrapper.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2013-2022 University of Amsterdam
# Copyright (C) 2013-2024 University of Amsterdam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -19,9 +19,12 @@

exploratoryFactorAnalysis <- function(
data = NULL,
version = "0.19",
version = "0.19.2",
addScores = FALSE,
addedScoresPrefix = "FA",
analysisBasedOn = "correlationMatrix",
bartlettTest = FALSE,
dataType = "raw",
eigenValuesAbove = 1,
factorCorrelations = FALSE,
factorCountMethod = "parallelAnalysis",
Expand All @@ -45,9 +48,10 @@ exploratoryFactorAnalysis <- function(
plotWidth = 480,
residualMatrix = FALSE,
rotationMethod = "oblique",
sampleSize = 200,
screePlot = FALSE,
screePlotParallelAnalysisResults = TRUE,
variables = list()) {
variables = list(types = list(), value = NULL)) {

defaultArgCalls <- formals(jaspFactor::exploratoryFactorAnalysis)
defaultArgs <- lapply(defaultArgCalls, eval)
Expand Down
12 changes: 7 additions & 5 deletions R/principalcomponentanalysisWrapper.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2013-2022 University of Amsterdam
# Copyright (C) 2013-2024 University of Amsterdam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -19,14 +19,15 @@

principalComponentAnalysis <- function(
data = NULL,
version = "0.19",
addComponentScores = FALSE,
version = "0.19.2",
addScores = FALSE,
addedScoresPrefix = "PC",
analysisBasedOn = "correlationMatrix",
bartlettTest = FALSE,
componentCorrelations = FALSE,
componentCountMethod = "parallelAnalysis",
componentLoadingsOrder = "sortByComponentSize",
componentsPrefix = "",
dataType = "raw",
eigenValuesAbove = 1,
kaiserMeyerOlkinTest = FALSE,
loadingsDisplayLimit = 0.4,
Expand All @@ -44,9 +45,10 @@ principalComponentAnalysis <- function(
plotWidth = 480,
residualMatrix = FALSE,
rotationMethod = "oblique",
sampleSize = 200,
screePlot = FALSE,
screePlotParallelAnalysisResults = TRUE,
variables = list()) {
variables = list(types = list(), value = NULL)) {

defaultArgCalls <- formals(jaspFactor::principalComponentAnalysis)
defaultArgs <- lapply(defaultArgCalls, eval)
Expand Down

0 comments on commit 2ad242a

Please sign in to comment.