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

Use gratia::response_derivatives() to get slopes? #24

Open
Aariq opened this issue Feb 4, 2025 · 1 comment
Open

Use gratia::response_derivatives() to get slopes? #24

Aariq opened this issue Feb 4, 2025 · 1 comment

Comments

@Aariq
Copy link
Member

Aariq commented Feb 4, 2025

Look into using response_derivatives() from gratia instead of marginaleffects to calculate (average) slopes. I suspect the gratia methods might handle confidence intervals more accurately in terms of testing whether the slopes differ from zero. Need to explore and think on this though.

https://gavinsimpson.github.io/gratia/reference/response_derivatives.html

@Aariq Aariq changed the title Use gratia::response_derivatives() to get slopes Use gratia::response_derivatives() to get slopes? Feb 4, 2025
@Aariq
Copy link
Member Author

Aariq commented Feb 4, 2025

I should at least use vcov = vcov(gam, unconditional = TRUE) in marginaleffects::avg_slopes() (#29)

https://stats.stackexchange.com/questions/609685/when-to-use-unconditional-false-in-plot-gam

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

No branches or pull requests

1 participant