Skip to content

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

Description

@linem7

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions