OHDSI / OHDSI/FeatureExtraction

Add function for creating interactions between covariates

Open
#170 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
R
Stars
74
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Sometimes we'd want to add interaction terms to a model. For example, if we believe our propensity model may change over time, we may want to add interactions between all existing covariates and index year. These interaction terms themselves would just be new covariates from the perspective of the model fitting.

For example, the interaction between 'T2DM in the last 365 days' and 'index year: 2022' would be the covariate 'T2DM in the last 365 days AND index year: 2022', which would have the value 1 if T2DM was observed in the last 365 days and the index year is 2022.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how the package currently represents covariates and how they are passed to model fitting. Define how interactions between existing covariates and index year should be exposed as new covariates, then verify the resulting values against the T2DM and index-year example.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.