tidyLPA icon indicating copy to clipboard operation
tidyLPA copied to clipboard

Round fit statistics to be the same between mclust and mplus

Open jrosen48 opened this issue 5 years ago • 2 comments

get_fit() returns many fit statistics. They are rounded slightly differently between mclust and mplus. See the vignette (which takes awhile to run and so has the global option eval = FALSE set in the package:

http://rpubs.com/jmichaelrosenberg/558008

What if we rounded every statistic across both packages to three decimal points?

jrosen48 avatar Dec 09 '19 15:12 jrosen48

If we did this, we would be throwing away perfectly fine information. The print functions already round to the same number of decimals (two, by default). The estimation functions should not be rounding the actual results.

cjvanlissa avatar Dec 09 '19 16:12 cjvanlissa

Good point, understood.

The print methods for estimate_profiles() (defaults to two digits)? I tried the following (and added digits = 2 as an argument to print(), but I think the same (default) number of digits:

library(dplyr)
library(tidyLPA)

iris_sample <- iris[c(1:4, 51:54, 101:104), ] # to make example run more quickly

# Example 1:
m1 <- iris_sample %>%
    subset(select = c("Sepal.Length", "Sepal.Width",
                      "Petal.Length")) %>%
    estimate_profiles(3:4)

get_fit(m1) %>%
    print()

Should we make the default print method for get_fit() also default to two (or three?) digits (not truncating the actual values themselves)?

jrosen48 avatar Dec 10 '19 14:12 jrosen48