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

Feature request: matchCohort - support matching from a predefined set of patients #223

Open
haugmarkus opened this issue Jun 13, 2024 · 1 comment

Comments

@haugmarkus
Copy link

Hello there,

I am interested in using the matchCohort function to address the following use case:
I want the function to generate a matching sample of patients from a predefined set of patients, so that I can compare the prevalence of different concepts between those cohorts using the CohortContrast package.

Is there a way to achieve this using the functionalities already implemented? If not, it would be an awesome feature to have. Please let me know if this is within the scope of the package.

Let's assume I have a target cohort with the ID of 1 and a control cohort with the ID of 2 in the cohort table. A potential execution could look like this:

matchCohorts(
  cohort,
  cohortId = 1,
  matchCohortId = 2,
  matchSex = TRUE,
  matchYearOfBirth = TRUE,
  ratio = 1,
  name = tableName(cohort)
)
@haugmarkus
Copy link
Author

I will tag @martaalcalde as I already informed her of my request :)

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