Hello Chris,
I've been working through your brainGraph R user guide - thank you for this, it's been tremendously helpful so far!!
My analysis is on between-group differences in several graph-level and vertex-level metrics. I have three groups (group 1 is the reference group in the coding below).
I have a question regarding brainGraph_GLM. I noticed that I obtain very different results with the following two scenarios:
1. Create a design matrix with brain_GLM_design, then supply this to the X argument in brainGraph_GLM.
> X.design.effect <- brainGraph_GLM_design(X, coding = 'effect')
> X.con.effect <- matrix(c(0,-2,-1,0,-1,-2,0,1,-1), nrow = 3, ncol = 3, byrow = T)
> summary(m1 <- brainGraph_GLM(g.list = g.glm, covars = covar.sna[,1:2],
measure = "transitivity", X = X.design.effect, con.mat = X.con.effect, level = 'graph',
con.type = 't', alternative = 'greater'))
...versus:
2. Provide design matrix information to arguments passed to brainGraph_GLM_design in the brainGraph_GLM function.
> X.con.effect <- matrix(c(0,-2,-1,0,-1,-2,0,1,-1), nrow = 3, ncol = 3, byrow = T)
> summary(m2 <- brainGraph_GLM(g.list = g.glm, covars = covar.sna[,1:2],
measure = "transitivity", coding = 'effect', con.mat = X.con.effect, level = 'graph',
con.type = 't', alternative = 'greater'))
When I compared m1$X vs. m2$X, I noticed that m2$X is no longer in the same order as 'Study.ID' (but m1$X retains the correct order). This occurs for when using the 'dummy' coding method as well. I'm assuming this is the reason for the differing results; however, which outcome is the accurate one?
Thanks for your help!
Kayleigh