You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lavaan
Hi,
I have previously assumed that I can fit a lavaan object with the model syntax or with a parameter table. In principle this seems to work, but the permuteMeasEq function produces an error when I pass a lavaan object that has been fitted with a parameter table. A (rather meaningless) example is attached below. Is there something I need to be aware of when passing such an object to permuteMeasEq, am I just doing something wrong, is it perhaps a version issue or is this a bug?
fit <- cfa(HS.model, data = HolzingerSwineford1939, group = "school") permuteMeasEq(nPermute = 10, con = fit)
fit.pt <- cfa(parTable(fit), data = HolzingerSwineford1939, group = "school") permuteMeasEq(nPermute = 10, con = fit.pt)
Terrence Jorgensen
unread,
Sep 9, 2022, 8:36:03 AM9/9/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lavaan
Try saving the parameter table to an object that the function can find in your workspace, instead of arbitrarily calling the parTable() function on the fly.
PT <- parTable(fit)
fit.pt <- cfa(PT, data = HolzingerSwineford1939, group = "school")
Does that work?
Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lav...@googlegroups.com
Hi Terrence,
that works. Many thanks for that! It's a bit hard to understand why permuteMeasEq needs to dive so deep into the R environment logic. When I call your solution with do.call, I also get unsurpringly an error. Anyway, I'm sure there is a workaround.
Thanks again!