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

Add a function to compute differences of smooths #70

Open
9 of 12 tasks
gavinsimpson opened this issue May 17, 2020 · 0 comments
Open
9 of 12 tasks

Add a function to compute differences of smooths #70

gavinsimpson opened this issue May 17, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@gavinsimpson
Copy link
Owner

gavinsimpson commented May 17, 2020

Compute differences of smooths for factor by smooths for pairs of levels: difference_smooths().

Output should be a tibble

# A tibble: 1 x 7
  smooth by    level_1 level_2  diff    se     x
  <chr>  <chr> <chr>   <chr>   <dbl> <dbl> <dbl>
1 s(x)   f     lev1    lev2      0.2 0.002     1
....

Needs:

Example fits

data <- data_sim("eg4")
m <- gam(y ~ fac + s(x2, by = fac) + s(x0), data = data)
@gavinsimpson gavinsimpson added the enhancement New feature or request label May 17, 2020
gavinsimpson added a commit that referenced this issue May 18, 2020
Initial code for smooth difference as per #70

* adds differences of smooths for univariate by factor smooths
* adds a draw() method for difference_smooths()
@gavinsimpson gavinsimpson added this to the 0.4 milestone May 18, 2020
@gavinsimpson gavinsimpson modified the milestones: 0.4, 0.5 May 30, 2020
@gavinsimpson gavinsimpson modified the milestones: 0.5, 0.6 Jan 23, 2021
@gavinsimpson gavinsimpson modified the milestones: 0.6, 0.7 Jun 25, 2021
@gavinsimpson gavinsimpson modified the milestones: 0.7, 0.8 Feb 19, 2022
@gavinsimpson gavinsimpson modified the milestones: 0.8, 0.9 Jan 26, 2023
@gavinsimpson gavinsimpson modified the milestones: 0.9, 0.10 Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant