-
Notifications
You must be signed in to change notification settings - Fork 18
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
Understanding the use of "X" in divnet() function #53
Comments
Hi Greg, Thanks for bringing up this question. Choosing what variables to include in your model is not trivial and depends on your scientific question as well as your experimental design. I generally recommend taking at least a couple of statistics classes (up to multiple regression) to give some context for model fitting. In short, the model that you would fit for DivNet is what you would include if you were fitting a simple or multiple regression on a univariate outcome. While I don't know the design of your experiments that you describe, here are some things that I would think about including in your models.
(Note that here I'm using R's I'm sorry that there isn't a more concrete answer for you, and that it depends so much on the setting that you're in. I'm happy to try to answer any more detailed questions you have, though. Statistical consultants at your institution can often advise on what variables to include in the model, too. Amy |
Hi Amy, Thank you so much for the helpful and thorough reply! The only issue is that it doesn't seem possible to add a blocking variable (or any multivariate model) in the Code:
Also, it appears that the Regarding the regression model: In my case, I have about ~20 metastases in the same tissue that originated from primary tumors of two different cancer types (half for each cancer type) across different patients. The data are shotgun sequencing for microbes with ~7000 features for the relatively small number of samples. I'm inclined, per your suggestion, to use Thank you so much again! (Apologies if I misunderstood anything) Sincerely, |
Hi Greg! I had completely forgotten that I hadn't implemented formula specification for Divnet. I'm going to ask my co-author @bryandmartin to implement this ASAP. @bryandmartin -- can you please make sure that DivNet maintains backwards compatibility but also allows for a formula? I think the corncob interface is great so perhaps we could just copy that. If you can write some Greg -- if every observation comes from a different patient then definitely don't include patient as a variable -- otherwise your model will be way overparameterised! However, if you want to add more than one variable to the model, you can adapt the following code. It employs
|
We've updated the documentation for Getting Started to reflect the various ways to specify covariates in the divnet() function. |
Hi Amy,
I'm in Rob Knight's lab and excited to see (and use) your DivNet package — congrats on the in press acceptance! I have a question regarding the use of the covariate matrix ("X") in the divnet() function. The example given in your tutorial uses the Lee dataset, picking "char" (basalts of different characteristics) as the covariate. I understand that this is useful when sampling from different environments, but I'm trying to figure out if it would include samples from the same environment that are affected by external factors. A few examples:
Is it permissible to use these differences as covariates ("X") for the divnet() function (e.g. antibiotic vs. non-antibiotic gut samples) even though they're technically sampled from the same environment?
Thanks a ton!
The text was updated successfully, but these errors were encountered: