Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ridgeplot! doesn't have default keys #43

Closed
Tokazama opened this issue Oct 6, 2021 · 4 comments · Fixed by #86
Closed

ridgeplot! doesn't have default keys #43

Tokazama opened this issue Oct 6, 2021 · 4 comments · Fixed by #86

Comments

@Tokazama
Copy link

Tokazama commented Oct 6, 2021

Recently got this error

julia> ridgeplot!(g_porb_ndi[1,1], boot_porb_ndi);
ERROR: KeyError: key :conf_level not found

It works if I set the key word arguments conf_level and show_intercept manually, but I figured these were supposed to have default values like ridgeplot

@palday
Copy link
Owner

palday commented Oct 12, 2021

Huh, I'm not sure exactly why that doesn't work. I know why it works for ridgeplot, but I thought the recipe set the default values.

I will have take another deep dive into recipes to understand this behavior, so it might be a while before this is fixed.

@jmmanley
Copy link

Some related kwarg weirdness with the auto-generated ridgeplot! method: although they are required, conf_level and vline_at_zero don't seem to do anything. But show_intercept seems to work.

m1 = fit(MixedModel,
         @formula(1000 / reaction ~ 1 + days + (1 + days | subj)),
         MixedModels.dataset(:sleepstudy))

nsamp = 1000
bootstrap = parametricbootstrap(nsamp, m1)

conf_level=0.95
vline_at_zero=true
show_intercept=true

fig = Figure(; resolution=(1200, 400))
ax1 = Axis(fig[1, 1]; title="just ridgeplot!")
ridgeplot!(ax1, bootstrap; conf_level, vline_at_zero, show_intercept)

ax2 = Axis(fig[1, 2]; title="ridgeplot! and coefplot!")
ridgeplot!(ax2, bootstrap; conf_level, vline_at_zero, show_intercept)
coefplot!(ax2, bootstrap; conf_level, vline_at_zero, show_intercept)
save("test.png", fig)

test

@palday
Copy link
Owner

palday commented Jan 25, 2024

@jmmanley which Makie/CairoMakie version are you using?

@jmmanley
Copy link

@palday I originally observed this with

  [13f3f980] CairoMakie v0.10.12
  [ff71e718] MixedModels v4.22.3
  [b12ae82c] MixedModelsMakie v0.3.27

and also reproduced it in a fresh environment with just

  [13f3f980] CairoMakie v0.11.6
  [ff71e718] MixedModels v4.22.3
  [b12ae82c] MixedModelsMakie v0.3.28

palday referenced this issue Mar 22, 2024
* start work on rank deficiency

* initial pass at conversion to recipeless implementation

* version and compat bump

* Indexable

* coefplot

* ridgeplot

* ridge2d

* YAS

* CI update

* handle rank deficiency

* add tests

* YAS

* fix a scope warning

* eliminate progress message in precompilation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants