kim0sun / glca

An R Package for Multiple-Group Latent Class Analysis
https://kim0sun.github.io/glca/
GNU General Public License v3.0
10 stars 2 forks source link

gofglca() can't be provided a list of models #13

Closed AlexGareau closed 5 months ago

AlexGareau commented 1 year ago

It would nice to not have to multiple arguments for each model to be compared with the gofglca() function. Given that it is standard practice to test in increment the number of class as an enumeration procedure, it would be nice if one could just provide a list of models like this

LCA <- map(2:6, function(nclass){ items %>% glca(item(names(.)) ~ 1, data = ., nclass = nclass, verbose = T) }) gofglca(LCA)

gofglca() return this error Error in gofglca(LCA) : All objects should be glca outputs.

but if I split it like this

gofglca(LCA[[1]], LCA[[2]], LCA[[3]]) Then it works.

kim0sun commented 1 year ago

You can use list in develop version now! Thank you for error report!