Skip to content

Models fail to converge, despite large sample size and variables with only 2 categories #133

@mmanus

Description

@mmanus

Hi, I'm having a problem that seems to be happening to others as well. I'm running the following model on a dataset of 100 samples, and the categorical variable that I'm specifying only has 2 categories. So far I'm unable to make this work with bbdml either, but I'm not completely sure that I'm setting up that model correctly.

Code:

family <- differentialTest(formula = ~ mom_bmi_best_cat2, phi.formula = ~ mom_bmi_best_cat2, formula_null = ~ 1, phi.formula_null = ~ mom_bmi_best_cat2, test = "Wald", boot = TRUE, B=5, data = manitoba_corncob_family, fdr_cutoff = 0.05)

Error:

Error in differentialTest(formula = ~mom_bmi_best_cat2, phi.formula = ~mom_bmi_best_cat2, :
All models failed to converge!

I have also tried this code based on reading others' conversations:

family <- differentialTest(formula = ~ mom_bmi_best_cat2, phi.formula = ~ mom_bmi_best_cat2, formula_null = ~ 1, phi.formula_null = ~ mom_bmi_best_cat2, test = "Wald", boot = TRUE, B=5, data = manitoba_corncob_family, fdr_cutoff = 0.05, init=rep(1,4))

But I receive this error:

Error in differentialTest(formula = ~mom_bmi_best_cat2, phi.formula = ~mom_bmi_best_cat2, :
argument 10 matches multiple formal arguments

For what it's worth, I successfully ran corncob a few months ago on a different dataset with a much smaller sample size (N=30), and those models included multiple covariates. I'm not attaching my files here as they were shared by a collaborator, but I can reproduce this error with another dataset and share those files, if that is helpful. Thanks in advance for any insight!

  • Melissa

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