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

Added support for mgcv::gaulss for find_formula and find_variables #841

Merged
merged 8 commits into from
Dec 24, 2023

Conversation

hhp94
Copy link
Contributor

@hhp94 hhp94 commented Dec 23, 2023

Fixes #840

Added support for mgcv::gaulss in find_formula and find_variables.

For R/find_formula.R/find_formula.gam, i'm pretty sure the is.null is supposed to be outside of the if mi$familly == x checks. Other than that, just a straight forward case of checking if the family is "gaulss" and if yes then extract not only the conditional variables for the location parameter but also the variables for the scale parameter.

For R/find_variables.R/find_variables, have to update the choices to also have "scale".

Added tests for this change. Sorry if there are any mistakes, this is my first PR ever

@strengejacke
Copy link
Member

Thanks a lot! I turned the if...else into a switch statement (suggested by lintr), and also addressed some other lintr-issues that were outside the scope of this PR (but still flagged, because they appeared in the files that have been changed - lintr checks modified files in PRs, so lintr-issues that existed before but were not spotted are now mentioned).

@strengejacke strengejacke merged commit 4c8be03 into easystats:main Dec 24, 2023
12 of 18 checks passed
@strengejacke
Copy link
Member

Thanks, I think remaining failing tests are not related to this PR

@hhp94 hhp94 deleted the find_formula_gaulss branch December 24, 2023 14:52
@hhp94
Copy link
Contributor Author

hhp94 commented Dec 24, 2023

The rstats community is great. Merry Christmas! I'll lookingto model_info and the link function related functions soon.

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 this pull request may close these issues.

Add family == "gaulss" to find_formula and find_variables for mgcv::gam
2 participants