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

Bug Report: Entropy Misplacement in readModels for LTA Models #212

Open
linem7 opened this issue Jul 17, 2024 · 0 comments
Open

Bug Report: Entropy Misplacement in readModels for LTA Models #212

linem7 opened this issue Jul 17, 2024 · 0 comments

Comments

@linem7
Copy link

linem7 commented Jul 17, 2024

Hi,

I would like to report a bug in the readModels function. When an LTA model using imputed data is passed to it, it seems that the entropy is included in the "FINAL CLASS COUNTS AND PROPORTIONS FOR EACH LATENT CLASS VARIABLE BASED ON THEIR MOST LIKELY LATENT CLASS PATTERN" rather than in the position it should be.

Here is an LTA example with 2 classes in T1 (C1) and 3 classes in T2 (C2):
example.txt

> example <- readModels("./MI Results/LTA", filefilter = "example")
Warning message:
In lapply(counts[, 2:4], as.numeric) : NAs introduced by coercion

> example[["class_counts"]][["mostLikely"]]
#   variable class count proportion
# 1       C1     1   495    0.80507
# 2       C1     2   119    0.19493
# 3       C2     1   228    0.37122
# 4       C2     2    39    0.06387
# 5       C2     3   347    0.56491
# 6       C2    NA    NA    0.71100

There is an erroneous row with an NA value in the class column, which should not be there. And the value 0.71100 in the proportion column is actually the entropy for the current model, I believe this may be the key reason why no entropy information is present in example[["summaries"]].

I hope this helps to identify and revise the potential error.

Thanks for your work!

Best,
Lin

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

1 participant