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

Assessing significance of smooth terms with permutation testing #341

Open
avaruuser opened this issue Nov 27, 2023 · 0 comments
Open

Assessing significance of smooth terms with permutation testing #341

avaruuser opened this issue Nov 27, 2023 · 0 comments

Comments

@avaruuser
Copy link

Hello, previously people have investigated the use of permutations for hypothesis testing of the smooth terms in GAMs (e.g. here). I'm relatively new to GAMs and wondered if you see any issues with how I implemented such a permutation testing procedure using pyGAM:

  1. Compute a GAM with the DV and IVs.
  2. Store the deviance explained from the GAM output using gam.score(IVs, DV)
  3. Randomly shuffle one of the IVs n_perms times (e.g. 10,000 times).
  4. Compute the GAM with the randomly shuffled IV.
  5. Store the deviance explained for each random permutation.
  6. Get p-value from the proportion of permutations that exceed the original deviance explained.
  7. Repeat this process for the other IVs

Does this make sense to you?

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