镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Continuous independent variable #16

Open

Description

@dxkeac

Hi, thanks for a nice tool! I have a question regarding the usage of FLASHMM. I am working with single-cell data from 10 samples, each measured at three time points. I would like to model the temporal effect by treating the time points as a continuous variable (e.g., 0, 1, 2), rather than as categorical factors.

Would it be appropriate to use FLASHMM in this setting to model continuous time effects? Any guidance or recommended practices would be greatly appreciated. Thank you!

Activity

  1. ChangjiangXu commented on Apr 13, 2026

    @ChangjiangXu
    Collaborator

    You may use FLASHMM by setting the time as a covariate and the sample as a random factor. For example, define the fixed and random effects formulas as fixed = ~ time + other covariates and random = ~ 0 + sample, and run flashmm function in the FLASHMM. Or let X = model.matrix(fixed) and Z = model.matrix(random), and run lmmfit function.

  2. dxkeac commented on May 7, 2026

    @dxkeac
    Author

    Thank you very much! I have one quick follow-up question: I also have bulk RNA-seq data, would FLASHMM still be appropriate for modeling longitudinal bulk RNA-seq data with repeated measures, each including three time points?
    Thank you again for your time and help!

  3. ChangjiangXu commented on May 7, 2026

    @ChangjiangXu
    Collaborator

    Yes, FLASHMM works for the longitudinal bulk RNA-seq data. For the bulk RNA-seq data, you may also use lme4 package.

  4. dxkeac commented on May 7, 2026

    @dxkeac
    Author

    Thank you very much for the suggestion. I will try FLASHMM, since I would like to use a faster method.

  5. dxkeac commented on May 7, 2026

    @dxkeac
    Author

    I am using lmmfit for longitudinal bulk RNA-seq data with the following model:

    fixed <- ~ time_c + time2_c + PC1 + PC3
    random <- ~ 0 + subject
    #fit <- lmmfit(Y, X, Z, d = ncol(Z))
    The result came out very quickly!

    I would like to perform a joint hypothesis test for the temporal effects, specifically:

    H0: β_time_c = 0 and β_time2_c = 0

    I am wondering if lmmtest() supports specifying a vector that jointly tests multiple fixed effects (e.g., time_c and time2_c)?

    Thank you!

  6. ChangjiangXu commented on May 8, 2026

    @ChangjiangXu
    Collaborator

    The lmmtest function doesn't test if a vector of parameters is zero. In this case, likelihood ratio test (LRT) can be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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