con.mat <- matrix(c(0, -2), nrow=1, dimnames=list('Control > Patient'))
X <- covars[, 1:2]
summary(brainGraph_GLM(g, measure='E.nodal.wt', covars=covars[, 1:2], + coding='dummy', con.mat=con.mat, alt='greater'))
Error: ncol(X) == ncol(con.mat) is not TRUE
But ncols(X)=2 and ncols(con.mat)=2
This is a very simple design, what am i doing wrong? :/
--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/f3b38e29-68bb-4863-9a8c-8961e48ddfb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> brainGraph_GLM_design(covars[, 1:2], coding='dummy')
Intercept Study.ID GroupPatient
[1,] 1 1 0
[2,] 1 2 0
[3,] 1 3 0
[4,] 1 4 0
[5,] 1 5 0
[6,] 1 6 0
[7,] 1 7 0
[8,] 1 8 0
[9,] 1 9 0
[10,] 1 10 0
[11,] 1 11 0
[12,] 1 12 0
[13,] 1 13 0
[14,] 1 14 0
[15,] 1 15 0
[16,] 1 16 0
[17,] 1 17 0
[18,] 1 18 0
[19,] 1 19 0
[20,] 1 20 0
[21,] 1 21 0
[22,] 1 22 0
[23,] 1 23 0
[24,] 1 24 0
[25,] 1 25 0
[26,] 1 26 0
[27,] 1 27 0
[28,] 1 28 0
[29,] 1 29 0
[30,] 1 30 0
[31,] 1 31 0
[32,] 1 32 0
[33,] 1 33 0
[34,] 1 34 0
[35,] 1 35 0
[36,] 1 36 0
[37,] 1 37 0
[38,] 1 38 0
[39,] 1 39 0
[40,] 1 40 0
[41,] 1 41 0
[42,] 1 42 0
[43,] 1 43 0
[44,] 1 44 0
[45,] 1 45 0
[46,] 1 46 0
[47,] 1 47 0
[48,] 1 48 0
[49,] 1 49 0
[50,] 1 50 0
[51,] 1 51 0
[52,] 1 52 0
[53,] 1 53 0
[54,] 1 54 0
[55,] 1 55 0
[56,] 1 56 0
[57,] 1 57 1
[58,] 1 58 1
[59,] 1 59 1
[60,] 1 60 1
[61,] 1 61 1
[62,] 1 62 1
[63,] 1 63 1
[64,] 1 64 1
[65,] 1 65 1
[66,] 1 66 1
[67,] 1 67 1
[68,] 1 68 1
[69,] 1 69 1
[70,] 1 70 1
[71,] 1 71 1
[72,] 1 72 1
[73,] 1 73 1
[74,] 1 74 1
[75,] 1 75 1
[76,] 1 76 1
[77,] 1 77 1
[78,] 1 78 1
[79,] 1 79 1
[80,] 1 80 1
[81,] 1 81 1
[82,] 1 82 1
[83,] 1 83 1
[84,] 1 84 1
[85,] 1 85 1
[86,] 1 86 1
[87,] 1 87 1
[88,] 1 88 1
[89,] 1 89 1
It's possibly an error when using "covars[, 1:2]" to create the design matrix. Is "covars" a "data.table" object?When you choose "coding='dummy'", this adds a column for the Intercept term; if the first 2 columns of "covars" are, for example, "Study.ID" and "Group", then I don't know what is causing the error. But if the "Group" column has data type "factor", and there are more than 2 levels in the factor, this could be causing the error. Please let me know the following:1. What does "covars" look like?2. What does the output of: brainGraph_GLM_design(covars[, 1:2], coding='dummy') look like, as well?Chris
On Mon, Jun 4, 2018 at 6:19 PM, özgün özalay <ozgun....@gmail.com> wrote:
Hi again Chris;I see you updated the package which is very good but also has a learning curve for me. This time my question is very simple;After creating graph list "g" as you instructed on user guide, I created contrast matrix for simple group comparison with
con.mat <- matrix(c(0, -2), nrow=1, dimnames=list('Control > Patient'))I created data table X with Study.ID and Group variables with
X <- covars[, 1:2]Then when i try summary function with brainGraph_GLM, dummy coding
summary(brainGraph_GLM(g, measure='E.nodal.wt', covars=covars[, 1:2], + coding='dummy', con.mat=con.mat, alt='greater'))I get this error;
Error: ncol(X) == ncol(con.mat) is not TRUEBut ncols(X)=2 and ncols(con.mat)=2This is a very simple design, what am i doing wrong? :/I am using brainGraph ver 2.20 from GitHubBest wishesOzgun
--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/f3b38e29-68bb-4863-9a8c-8961e48ddfb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "brainGraph-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/brainGraph-help/zdk3F6P8LAc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74jtSEs8_Z-uBEAUPo3_B32hZ4%2Bt6e_u1mtvSbdhnPO1PQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/f3b38e29-68bb-4863-9a8c-8961e48ddfb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "brainGraph-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/brainGraph-help/zdk3F6P8LAc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74jtSEs8_Z-uBEAUPo3_B32hZ4%2Bt6e_u1mtvSbdhnPO1PQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Department of NeuroscienceInstitute of Health SciencesEge University, Izmir, TurkeyDepartment of PsychiatryEge University Hospital, Izmir, Turkey
--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CADjkCccVHs_Tx9uu%3DinThv1PUSpNj31mx%3DtUeHHYX2R_e0RrGw%40mail.gmail.com.
summary(brainGraph_GLM(g, measure = 'E.nodal.wt', covars = covars[, 'Group'], coding = 'dummy', con.mat= con.mat, alt='greater'))
gives,
Error in `[.data.table`(covars, !complete.cases(covars), Study.ID) :
j (the 2nd argument inside [...]) is a single symbol but column name 'Study.ID' is not found. Perhaps you intended DT[, ..Study.ID]. This difference to data.frame is deliberate and explained in FAQ 1.1.
summary(brainGraph_GLM(g, measure = 'E.nodal.wt', covars = covars[, 1:2], coding = 'dummy', con.mat= con.mat, alt='greater'))
gives same error again
Error: ncol(X) == ncol(con.mat) is not TRUE
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/f3b38e29-68bb-4863-9a8c-8961e48ddfb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "brainGraph-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/brainGraph-help/zdk3F6P8LAc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74jtSEs8_Z-uBEAUPo3_B32hZ4%2Bt6e_u1mtvSbdhnPO1PQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Department of NeuroscienceInstitute of Health SciencesEge University, Izmir, TurkeyDepartment of PsychiatryEge University Hospital, Izmir, Turkey
--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/de54b338-31d3-4bc5-8b99-ed8826743300%40googlegroups.com.
brainGraph_GLM(g.glm, measure='E.nodal.wt', covars=covars.dti[, 1:2],
coding='effects', con.mat=con.mat, alt='greater')))
g <- lapply(corrs, function(x)
apply(x$r.thresh, 3, function(y)
graph_from_adjacency_matrix(x$R * y, mode='undirected', diag=F, weighted=T)))
g <- Map(function(x, y) llply(x, set_brainGraph_attr, atlas=atlas,
modality=modality, group=y, .progress='text'),
g, as.list(groups))
Error in vcount(g.list[[1]]) : Not a graph object
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/babdabff-d180-447c-bc57-db23e2f42289%40googlegroups.com.