Closed gabrielet closed 1 year ago
Hi @gabrielet,
I think the correct way of specifying random effects in your case is
rand_formula = "(1 | CollectionSite)",
Could you try and see if the issue remains?
ANCOM-BC2 follows the
lmerTest
package in formulating the random effects. For more details, I recommend reading their paper.
Also the closing unused connection 4
warning message you saw is likely that the ancombc2
was stopped manually ealier. This is not a warning message from ancombc2
but from the parallel computing procedure. You can run the following function to solve the issue
unregister_dopar <- function() {
env <- foreach:::.foreachGlobals
rm(list=ls(name=env), pos=env)
}
or simply restart your RStudio or R.
Best, Huang
Hello @FrederickHuangLin,
so, as you pointed out this:
rand_formula = "(1 | CollectionSite)"
seems to be the way of specifying random effects, according to the lmerTest package. As they mention in the manual, regarding the lmer()
function, in the formula:
Random-effects terms are distinguished by vertical bars (|) separating expressions for design matrices from grouping factors.
My bad for not having double-checked the lmer()
function and thank you for your suggestions!
So, I am running ANCOMBC2 on a phyloseq object and I am seeing this warning thrown multiple times:
I searched for some hints and found a post in the ANCOM page. This thread suggested that the warning was not a problem because the person asking was not using random effects. However, I am using random effect so I was wondering if this is an actual problem or not.
Maybe there are issues in how I set
ancombc2()
parameters but they are mostly set as default so I believe they should be ok. What is going on, then?Maybe it's because the variable
Treatment
has only two levels and I am passing it asgroup
?EDIT:
i am doing some experiments with
ancombc2
, and from time to time I get another warning:which I don't understand.