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

Why is simulateLeeHastie saving latent variables? #34

Open
samblechman opened this issue Oct 1, 2024 · 8 comments
Open

Why is simulateLeeHastie saving latent variables? #34

samblechman opened this issue Oct 1, 2024 · 8 comments

Comments

@samblechman
Copy link

I am using the simulateLeeHastie function to generate a ground truth DAG and synthetic data from it (20 measured and 5 latent variables, in this case). The ground truth DAG includes the latent variables, but marks them with parentheses, e.g., (X1);X2.

However, when I convert the tetrad data to pandas, the pandas dataframe sometimes (but not always!) contains some (or all, or none) of the latent variables. Why is this? Is there a way that I can ensure that latent variables do not end up in the tetrad data set?

Thanks!

@jdramsey
Copy link
Collaborator

jdramsey commented Oct 1, 2024

Oh good point. I'm headed up a to a coffee shop in a few minutes; if I have a few minutes I'll take a look.

@samblechman
Copy link
Author

Thank you for your quick response! It would also be nice to have some way of recording which nodes are latent (to visualize with a different color, for example). Is there some way to do this programmatically?

@jdramsey
Copy link
Collaborator

jdramsey commented Oct 1, 2024

From Python?? In the Tetrad interface (i.e. the Java interface) they're represented differently. How are you plotting them?

@jdramsey
Copy link
Collaborator

jdramsey commented Oct 1, 2024

Hmm... are you usign GraphViz?

@samblechman
Copy link
Author

Yes, using GraphViz from python.

@jdramsey
Copy link
Collaborator

jdramsey commented Oct 1, 2024

You can write a graphviz output however you like actually; it's very flexible. You don't need to use the one we provide. You can make the latent and measured variables appear however you want them to appear, and there are various canned graph layouts that are available.

@jdramsey
Copy link
Collaborator

jdramsey commented Oct 1, 2024

Actually give me a few days to get back to you on all this--I have another project I also need to work on this afternoon as well...

@samblechman
Copy link
Author

Okay! Thanks so much.

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