diff --git a/DESCRIPTION b/DESCRIPTION index f18959e..43489a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -51,8 +51,8 @@ Description: SEM Trees and SEM Forests -- an extension of model-based decision License: GPL-3 Encoding: UTF-8 LazyLoad: yes -Version: 0.9.19 -Date: 2023-11-24 +Version: 0.9.20 +Date: 2024-03-14 RoxygenNote: 7.2.3 VignetteBuilder: knitr BugReports: https://github.com/brandmaier/semtree/issues diff --git a/R/npar.R b/R/npar.R new file mode 100644 index 0000000..88256b1 --- /dev/null +++ b/R/npar.R @@ -0,0 +1,12 @@ +npar <- function(x) { + if (is(x,"OpenMx") || is(x,"MxRAMModel")) { + stop("npar() not implemented yet") + } else if (is(x, "ctsemFit")) { + stop("npar() not implemented yet") + } else if (is(x,"lavaan")) { + pt <- parameterTable(x) + sum(pt$free!=0) + } else { + stop("npar() not implemented yet") + } +} \ No newline at end of file diff --git a/R/semtree.R b/R/semtree.R index 948cf7c..e4fc4a1 100644 --- a/R/semtree.R +++ b/R/semtree.R @@ -130,6 +130,14 @@ semtree <- function(model, data=NULL, control=NULL, constraints=NULL, if (checkControl(control)!=TRUE) {stop( "Unknown options in semtree.control object!");} } + # + + + # set min.bucket and min.N heuristically + if (is.null(control$min.bucket)) { + control$min.bucket = control$min.N / 2 + } + if (control$method=="cv") { ui_stop("This method ceased to exist. Please see modern score-based tests.") }