Skip to content

Commit

Permalink
skeleton for specification search
Browse files Browse the repository at this point in the history
  • Loading branch information
FloSchuberth committed Feb 5, 2025
1 parent b9d6567 commit 7639b0d
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export(csem)
export(doIPMA)
export(doNonlinearEffectsAnalysis)
export(doRedundancyAnalysis)
export(doSpecificationSearch)
export(exportToExcel)
export(fit)
export(getConstructScores)
Expand Down
21 changes: 21 additions & 0 deletions R/helper_doSpecificationSearch.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#' Internal: perform GA
#'
#' Transforms a p-value into stars.
#'
#'
#' @usage get_significance_stars(
#' X
#' )
#'
#' @inheritParams csem_arguments
#'
#' @return Character string. A p-value transformed into a star.
#'
#' @keywords internal
#'
ga = function(
X
){

X
}
37 changes: 37 additions & 0 deletions R/postestimate_doSpecificationSearch.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#' Specification search
#'
#' \lifecycle{experimental}
#'
#' The `doSpecificationSearch()`
#'
#' @usage doSpecificationSearch(
#' .object = NULL)
#'
#' @inheritParams csem_arguments
#'
#'
#' @return List
#'
#' @seealso [csem()], [cSEMResults], \link[DiagrammeR]{grViz}
#'
#'
#' @example inst/examples/example_doSpecificationSearch.R
#'
#' @export


doSpecificationSearch <- function(.object = NULL){

out=list()



out[["Estimates"]]=.object$Estimates
out[[2]]=.object$Information$Model
out[[3]]=.object$Information$Data
out[[4]]=.object$Information$Arguments$.data

# ga(X)

out
}
1 change: 1 addition & 0 deletions cSEM.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: e9c4f34e-2293-4e27-9cf3-b2f55153a1dd

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down
22 changes: 22 additions & 0 deletions inst/examples/example_doSpecificationSearch.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
model_IT_Flex="
# Composite models
ITComp <~ ITCOMP1 + ITCOMP2 + ITCOMP3 + ITCOMP4
Modul <~ MOD1 + MOD2 + MOD3 + MOD4
ITConn <~ ITCONN1 + ITCONN2 + ITCONN3 + ITCONN4
ITPers <~ ITPSF1 + ITPSF2 + ITPSF3 + ITPSF4
# Saturated structural model
ITPers ~ ITComp + Modul + ITConn
Modul ~ ITComp + ITConn
ITConn ~ ITComp
"

# Estimate the model using PLS:
out <- csem(.data = ITFlex,
.model = model_IT_Flex,
.resample_method = "none")


doSpecificationSearch(out)


48 changes: 48 additions & 0 deletions man/doSpecificationSearch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/ga.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7639b0d

Please sign in to comment.