easystats / easystats/performance

add r2 for lavaan

Open
#199 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement :boom:
Dominant language
R
Stars
1.2k
Forks
109
Avg merge
6h 34m
Merged PRs (30d)
8

Description

m <- lavaan::sem("mpg ~ cyl
                   hp ~ am", 
                 data = mtcars)

lavaan::lavInspect(m, "rsquare")
#>   mpg    hp 
#> 0.686 0.033

performance::r2(m)
#> 'r2()' does not support models of class 'lavaan'.
#> [1] NA

Created on 2021-02-17 by the reprex package (v1.0.0)

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

No source file or test is named. Start by running the provided lavaan example and inspect existing r2 model support; done when performance::r2(m) supports lavaan and returns the demonstrated R² values rather than NA.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.