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

Fix 38 age interval get age group #43

Merged
merged 15 commits into from
Feb 24, 2024

Conversation

davidsantiagoquevedo
Copy link
Member

Fixed get_age_group() responding to issue #38. Main changes:

  • Age intervals are defined directly by step from min_val to max_val.
  • When (max_val- min_val)%%setp != 0, a warning is returned and the function uses the closest lower value to [
    max_val that satisfies the condition.
  • When min_val !=0 the ages lower than min_val are grouped in the interval <min_val
  • Refactorization of tests for get_age_group() responding to its new characteristics
  • Updated documentation of the function
  • Refactorization of the last test for coh_test_noconf

@davidsantiagoquevedo davidsantiagoquevedo linked an issue Feb 13, 2024 that may be closed by this pull request
4 tasks
@davidsantiagoquevedo davidsantiagoquevedo merged commit 16496ab into main Feb 24, 2024
7 checks passed
@davidsantiagoquevedo davidsantiagoquevedo deleted the fix-38-age-interval-get_age_group branch February 24, 2024 13:00
davidsantiagoquevedo added a commit that referenced this pull request Mar 13, 2024
* feat: match function

* refac: added MatchtIt to Description

* feat: documentation, removed  in output. Changed name of function

* roxygen: generate documentation match_cohort

* feat: added basic estructure of function to censore matches

* Fix 38 age interval get age group (#43)

* fix: definition of age interval when (max_val-min_val)%%setp !=0. Added option to set interval '<min_val' when min_val<0

* refac: removed test forcing interval '>max_val', when (max_val-min_val)%%step!=0. Added test for min_val>0

* refac: step=10 on PH-accept test

* feat: pulled description from previous PR

* feat: warning for module of interval by step different to zero. Updated documentation of the function

* simplified tests to control warning

* roxygen: description of warning and lower value

* fix: assert_number replaced by assert_integerish

* fix: upper = max_val for assertion on min_val

* style: documentation

* fix: warning message for (max-min)%%step!=0

* roxygen: automatic update

* fix: assert_integerish replaced by assert_int, better for integer numbers. Removed upper check for min_val to avoid redundancy with lower check for max_mal

* fix: example in documentation

* feat: test for non-integer values

* refac: simplified workflow of match_cohort. Set method = nearest by default and ratio = 1 in matchit

* fix: documentation reflecting changes in match_cohort()

* roxygen: refac match_cohort

* feat: documentation censore_match

* roxygen: documentation censore_cohort

* fix: example in documentation of both functions and column selection excluding weights to pass gp()

* roxygen: fixed examples

* feat: test for basic expectations and minimum censoring date

* fix: return ordered datetype column matching with order of data frame

* fix: test for minimum values. Added test for datetype

* feat: tests for match_cohort

* added MatchIt to wordlist

* refac: replaced 'censore' by 'censor'. This misspelling had propagated throughout all the new functions

* removed duplicated test

* refac: added control for censoring date of matches. No censoring if member of couple presents outcome before censoring date

* feat: test for outcome date before censoring date

* sytle: lintr line 73

* roxygen: changes in documentation by adding outcome_date_col to params

* feat: input checks censor_match

* refac: censor_match() renamed as get_censoring_date_match

* refac: removed caliper from input.  receives it now
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.

Definition of age interval in get_age_group
2 participants