Skip to content

Different ymodel within a single call #46

@huichen99

Description

@huichen99

Dear Developer,

I am using the gformula function to estimate intervention effects and would like to include multiple intervention scenarios. Specifically, I am working with four arms: one without intervention and three with different variables as interventions. The intervened variables are highly correlated—one may be the sum of the other two—so I need to use different ymodels for each intervention scenario.

For example.

Intervention 1: threshold intervention of fruit >2 unit/week
Intervention 2: threshold intervention of vegetable >2 unit/week
Intervention 3: threshold intervention of fruit+vegetable >4 unit/week

Because a new variable frt_vege = fruit+vegetable would be highly collinear with fruit and vegetable, they could not be placed in a single model. Is the package designed to accommodate this type of setup?

I also attempted to run separate gformula() calls for each intervention arm, but observed significant variation in the natural (no intervention) g-form risk across runs. While I'm not entirely sure of the cause, I assume that modeling multiple intervention arms within a single call may improve comparability.

Any guidance would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions