From 2ad242a429dd2ad7ac60a8b2245cbe7566b8955c Mon Sep 17 00:00:00 2001 From: boutinb Date: Tue, 5 Nov 2024 14:36:12 +0100 Subject: [PATCH] Update wrappers --- R/confirmatoryfactoranalysisWrapper.R | 18 ++++++++++-------- R/exploratoryfactoranalysisWrapper.R | 10 +++++++--- R/principalcomponentanalysisWrapper.R | 12 +++++++----- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/R/confirmatoryfactoranalysisWrapper.R b/R/confirmatoryfactoranalysisWrapper.R index e6d5d93..5799029 100644 --- a/R/confirmatoryfactoranalysisWrapper.R +++ b/R/confirmatoryfactoranalysisWrapper.R @@ -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 @@ -19,11 +19,12 @@ 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, @@ -31,7 +32,7 @@ confirmatoryFactorAnalysis <- function( 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", @@ -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, @@ -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) { @@ -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) } diff --git a/R/exploratoryfactoranalysisWrapper.R b/R/exploratoryfactoranalysisWrapper.R index 37f5bef..f6a50e3 100644 --- a/R/exploratoryfactoranalysisWrapper.R +++ b/R/exploratoryfactoranalysisWrapper.R @@ -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 @@ -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", @@ -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) diff --git a/R/principalcomponentanalysisWrapper.R b/R/principalcomponentanalysisWrapper.R index 9e4bb82..07f3d83 100644 --- a/R/principalcomponentanalysisWrapper.R +++ b/R/principalcomponentanalysisWrapper.R @@ -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 @@ -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, @@ -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)