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

issue with lavaanToGraph with parameters fixed to 0 #66

Open
mrhemtulla opened this issue Sep 13, 2022 · 0 comments
Open

issue with lavaanToGraph with parameters fixed to 0 #66

mrhemtulla opened this issue Sep 13, 2022 · 0 comments

Comments

@mrhemtulla
Copy link

If a parameter is fixed to zero in lavaan by specifying the parameter and fixing it with 0*, lavaanToGraph reads that as though the parameter is estimated, and the independence is not coded. Example:

Sigma <- matrix(c(1, .5, .5, .5, 1, .5, .5, .5, 1), 3, 3)
colnames(Sigma) <- c("X", "M", "Y")
Model <- 'Y ~ M
          M ~ X
          X ~ 0*Y'

fitModel <- sem(model = Model, sample.cov = Sigma, sample.nobs = 100)
param <- parameterEstimates(fitModel)
dag <- lavaanToGraph(param)
plot(dag)
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