-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error when using interaction term in formla, in ancombc2 #297
Comments
Running into the same issue with 2.6.0. Error in .data_qc(meta_data = core2$meta_data, formula = fix_formula, : I also ran on the test code from the ANCOM-BC2 tutorial and encounter the same error: `> library(ANCOMBC)
SessionInfo() Matrix products: default locale: time zone: America/Detroit attached base packages: other attached packages: loaded via a namespace (and not attached): |
I was receiving the same errors, and realized that the version downloaded using BiocManager::install("ANCOMBC") was not actually the updated version (despite still saying it is version 2.6.0). Installing directly from github using devtools::install_github("FrederickHuangLin/ANCOMBC") seems to install the correct version 2.6.0, and I was able to run models including the interaction term. |
Thanks @ctilves this fixed the issue for me! |
I came here looking for a solution to this issue as well. Thank you, @ctilves. Your suggestion solved the problem, and the model will now run with interaction terms. |
Dear author,
I found a error when running anbombc2 with interaction term in formula.
ancombc2 version : 2.4.0
my R codes
out = ancombc2(data =phy_tmp, tax_level = "Species", fix_formula = "TimePoint * Group + AGE + SEX", rand_formula = "(1 + TimePoint |siteID) + ( 1 | siteID:subjectID)", p_adj_method = "BH", pseudo_sens = TRUE, prv_cut = 0.10, lib_cut = 1000, s0_perc = 0.05, group = "Group", struc_zero = TRUE, neg_lb = TRUE, alpha = 0.05, n_cl = 5, verbose = TRUE, global = T, pairwise = T, dunnet = T, trend = F, iter_control = list(tol = 1e-2, max_iter = 20, verbose = TRUE), em_control = list(tol = 1e-5, max_iter = 100), lme_control = lme4::lmerControl(), mdfdr_control = list(fwer_ctrl_method = "BH", B = 100) )
error message:
Error in .data_qc(meta_data = core2$meta_data, formula = fix_formula, : The following variables specified are not in the meta data: TimePoint * Group
So i did some dig in, found the function .data_qc() should take fix_formula as a reference to check the metadata varaible, but somehow it can not recognize "*" .
I replaced "TimePoint * Group + AGE + SEX" by "TimePoint + Group + AGE + SEX" for .data_qc() function. And use original "TimePoint * Group + AGE + SEX" for later modeling. i run as expected.
So, is it a bug or you did this for some reasons to disable interaction terms?
thanks
Zhou
The text was updated successfully, but these errors were encountered: