tidyLPA
tidyLPA copied to clipboard
Round fit statistics to be the same between mclust and mplus
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?
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.
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)?