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 wrappers that allow streamlined usage of linear and glm functions #18

Merged
merged 8 commits into from
Apr 4, 2024

Conversation

mbannick
Copy link
Owner

@mbannick mbannick commented Apr 2, 2024

See NEWS.md file for additional details:

  • Added robincar_glm2 and robincar_linear2 functions which allow user more control over covariate adjustment settings rather than the default internal logic for how to specify the working model. Specifically, in robincar_linear2, if users want to include strata as covariates, they add the strata variables directly to covariate_cols. In robincar_glm2, only the "formula" argument is available, rather than relying on the combination of covariate_cols, include_strata_as_covariate, and adj_method as arguments to specify the working model. This is a more direct way to specify the working model.
  • Fixed two bugs in the function that parses formulas. Both would have caused breaking errors for the user. Specifically, (1) the previous version couldn't handle parentheses in the formula and (2) if someone had overlapping names for treatment/response variables with covariates e.g., treatment col is "A" but covariate col is "A1", it would incorrectly parse this formula.
  • Added a NEWS.md file for tracking changes that is user-facing.

Internally, changed strata to car_strata. This results in a large number of files modified. You can ignore these changes. The files to review are:

  • Data.R for the updated formula code (see commit bb50936)
  • robincar_glm.R for robincar_glm2() and robincar_linear.R for robincar_linear2() (see commits e4a9fb1, 8a59068 and cb7d83f)
  • NEWS.md (see commit 21af579)

@mbannick mbannick requested a review from tye27 April 2, 2024 17:52
@mbannick mbannick merged commit 5755806 into main Apr 4, 2024
2 checks passed
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.

2 participants