@@ -88,10 +88,14 @@ lav_model_set_parameters <- function(lavmodel = NULL, x = NULL) {
8888 # which mm belong to group g?
8989 mm.in.group <- 1 : nmat [g ] + cumsum(c(0L , nmat ))[g ]
9090
91- if (lavmodel @ estimator %in% c(
92- " ML" , " WLS" , " GLS" , " DWLS" , " ULS" , " PML" ,
93- " catML"
94- )) {
91+ if (lavmodel @ estimator %in% c(" MML" , " FML" )) {
92+ # ttt <- diag(tmp[mm.in.group]$theta)
93+ # diag(tmp[mm.in.group]$theta) <- as.numeric(NA)
94+ # if(length(lavmodel@num.idx[[g]]) > 0L) {
95+ # diag(tmp[mm.in.group]$theta)[ lavmodel@num.idx[[g]] ] <-
96+ # ttt[ lavmodel@num.idx[[g]] ]
97+ # }
98+ } else {
9599 if (lavmodel @ parameterization == " delta" ) {
96100 tmp [mm.in.group ] <-
97101 lav_lisrel_residual_variances(
@@ -107,13 +111,6 @@ lav_model_set_parameters <- function(lavmodel = NULL, x = NULL) {
107111 num.idx = lavmodel @ num.idx [[g ]]
108112 )
109113 }
110- } else if (lavmodel @ estimator %in% c(" MML" , " FML" )) {
111- # ttt <- diag(tmp[mm.in.group]$theta)
112- # diag(tmp[mm.in.group]$theta) <- as.numeric(NA)
113- # if(length(lavmodel@num.idx[[g]]) > 0L) {
114- # diag(tmp[mm.in.group]$theta)[ lavmodel@num.idx[[g]] ] <-
115- # ttt[ lavmodel@num.idx[[g]] ]
116- # }
117114 }
118115 }
119116 } else {
@@ -122,8 +119,8 @@ lav_model_set_parameters <- function(lavmodel = NULL, x = NULL) {
122119 }
123120
124121 if (lavmodel @ composites ) {
125- # for package stdmod only! (vignette stdmod_lavaan uses old fit object)
126- # if (.hasSlot(lavmodel, "composites") && lavmodel@composites) {
122+ # for package stdmod only! (vignette stdmod_lavaan uses old fit object)
123+ # if (.hasSlot(lavmodel, "composites") && lavmodel@composites) {
127124 nmat <- lavmodel @ nmat
128125 if (lavmodel @ representation == " LISREL" ) {
129126 for (g in 1 : lavmodel @ nblocks ) {
@@ -267,9 +264,12 @@ lav_model_dmmdpar <- function(lavmodel, target = "theta", group = 1L) {
267264 # find target model matrix
268265 mlist.idx <- which(names(MLIST ) == target )
269266 if (length(mlist.idx ) == 0L ) {
270- lav_msg_stop(gettextf(
271- " model matrix \" %s\" not found. Available model matrices are:" , target ),
272- paste(names(MLIST ), collapse = " " ))
267+ lav_msg_stop(
268+ gettextf(
269+ " model matrix \" %s\" not found. Available model matrices are:" , target
270+ ),
271+ paste(names(MLIST ), collapse = " " )
272+ )
273273 }
274274
275275 # target idx in GLIST
0 commit comments