Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round fit statistics to be the same between mclust and mplus #142

Open
jrosen48 opened this issue Dec 9, 2019 · 2 comments
Open

Round fit statistics to be the same between mclust and mplus #142

jrosen48 opened this issue Dec 9, 2019 · 2 comments

Comments

@jrosen48
Copy link
Collaborator

jrosen48 commented Dec 9, 2019

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?

@cjvanlissa
Copy link
Collaborator

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.

@jrosen48
Copy link
Collaborator Author

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants