easystats / easystats/parameters
Issue with multiple-group models and blavaan
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 499
- Forks
- 45
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 3
Description
When I run model_parameters on lavaan and blavaan model objects, it usually works. But I have encountered an issue for sem models with multiple-groups. For lavaan, model_parameters() is able to return the parameter estimates for a multiple-group model object (with a Group column indicating which group the model parameters belong to), but when I run the same multip-group model in blavaan, model_parameters() returns the following error message:
Error in coef_labels[coef_labels == unique_labels[ll]] <- params[param_tab$label == :
replacement has length zero
Have others encountered this issue and is there a fix?
Thanks in advance!
Niels
Originally posted by @NielsSkovgaard-Olsen in https://github.com/easystats/parameters/issues/185#issuecomment-1165479223
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the model_parameters() entry point and reproduce the reported error with a multiple-group blavaan sem model, comparing its parameter output with the corresponding lavaan model. Done means model_parameters() returns parameter estimates for each blavaan group without the coef_labels replacement error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- analytics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100