Effect of covariate in GLM
1
0
Entering edit mode
5.0 years ago
evoBio ▴ 50

I am doing differential abundance analysis of antibiotic resistance genes present in metagenomic samples using MetagenomeSeq (using fitZig). I have sequence files from control mice and mice treated with antibiotic at different time periods (samples harvested at 24, 48 and 72 hrs). I want to find out if there are any statistically significant antibiotic resistance genes present in the treatment samples compared to controls.

Also, these mice are grouped in cages where there are six mice in each cage, and I am trying to find out if adding the cage grouping as a covariate to the GLM has any effect. I am new to this type of analysis and I have run my model with and without the covariate. I am not sure how to figure out if the cage grouping covariate has any effect on the model. Any help would be appreciated.

My model matrix is as follows:

sampType <- c("control","control","control","control","hrs24","hrs24","hrs24","hrs24","hrs48","hrs48","hrs48","hrs48","hrs72","hrs72","hrs72","hrs72")

cageGrps <- c("9","9","10","10","11","11","11","12","13","13","13","14","15","15","15","16")

mod <- model.matrix(~sampType + cageGrps)
metagenomeseq glm metagenomics • 860 views
ADD COMMENT
0
Entering edit mode
5.0 years ago

You can check the p-value for cageGrps in a model on its own, and then infer whether or not it is having any statistically significant effect. So, just do something like this:

summary(glm(outcome ~ cageGrps, data = data, family = binomial(link = 'logit'))

If it's p-value is statistically significant, then you should include cageGrps as a covariate in your formula.

This is the simplest way to justify inclusion of a covariate. Other ways likely exist.

Note that some researchers will want to include a covariate for 'political' reasons, even if it shows no statistically significant effect in their particular cohort. For example, in cases where previous literature found an association, one may want to adjust for BMI and / or smoking status in a rheumatoid arthritis or Crohn's Disease study.

Kevin

ADD COMMENT
0
Entering edit mode

Thanks Kevin. Will try that.

ADD REPLY

Login before adding your answer.

Traffic: 2739 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6