Skip to content

Allow method = "lmm" in mia::getCrossAssociation with parameter for random effects #765

@xec-cm

Description

@xec-cm

Description:
Currently, mia::getCrossAssociation does not support using linear mixed models (method = "lmm"). It would be very useful to extend the function so that users can specify method = "lmm" and provide an additional parameter to define the variable(s) used for random effects.

Use case:
In many microbiome studies, repeated measures or clustered data (e.g., multiple samples from the same subject) are common. Being able to include random effects would allow a more appropriate modeling of within-subject correlation, avoiding inflated type I error rates and improving inference.

Proposed solution:

  • Add support for method = "lmm" in mia::getCrossAssociation.
  • Introduce a new argument (e.g., random_effects or random) where the user can specify the variable(s) to be used as random effects.

Example (hypothetical):

res <- mia::getCrossAssociation(
  x = data,
  y = outcome,
  method = "lmm",
  random_effects = "subject_id"
)

Benefits:

  • Enables analysis of longitudinal or clustered microbiome data.
  • Increases flexibility and applicability of mia::getCrossAssociation to real-world study designs.

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