easystats / easystats/parameters

Issue with multiple-group models and blavaan

Open
#735 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug :bug:
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.