easystats / easystats/performance

test_performance for GAMMs

Open
#201 1 comment 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

Will try to look into this when I have time:

model1 <- mgcv::gamm(Sepal.Length ~ s(Petal.Width), random=list(Species = ~1), data=iris, family=inverse.gaussian(link = "identity"))
#> 
#>  Maximum number of PQL iterations:  20
#> iteration 1
#> iteration 2
#> iteration 3
model2 <- lme4::glmer(Sepal.Length ~ poly(Sepal.Width, 2) + (1|Species), data=iris, family=inverse.gaussian(link = "identity"))
model3 <- gamm4::gamm4(Sepal.Length ~ s(Petal.Width), random=~(1|Species), data=iris, family=inverse.gaussian(link = "identity"))

performance::test_performance(model1, model2)
#> Name   | Model.model1 | Model.model2
#> ------------------------------------
#> model1 |          lme |     glmerMod
#> model2 |          gam |     glmerMod
#> Models were detected as nested and are compared in sequential order.
performance::test_performance(model1, model3)
#> Warning: Unable to extract terms from the following models: 
#> model3
#> Name   | Model.model1 | Model.model3
#> ------------------------------------
#> model1 |          lme |     glmerMod
#> model3 |          gam |          gam
#> Models were detected as nested and are compared in sequential order.
performance::test_performance(model2, model3)
#> Warning: Unable to extract terms from the following models: 
#> model3
#> Name   | Model.model2 | Model.model3
#> ------------------------------------
#> model2 |     glmerMod |     glmerMod
#> model3 |     glmerMod |          gam
#> Each model is compared to model2.

Created on 2021-02-20 by the reprex package (v0.3.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

Start by reproducing the three test_performance(model1, model2), test_performance(model1, model3), and test_performance(model2, model3) examples from the issue. Compare the warnings and model tables for the mgcv::gamm, lme4::glmer, and gamm4::gamm4 cases; done requires a clearly documented or corrected outcome for GAMM comparisons.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data, testing-qa
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.