How to convert the ordinal categorical trait in the WGCNA?
1
0
Entering edit mode
4.3 years ago
Quark W • 0

Hello everyone, I am performing WGCNA to estimate the relationship of modules with clinical traits. The clinical information includes numeric variable (Age), binominal variable (Sex) and ordinal varible with four levels (TNM Stage: I, II, III and IV).

I only konw that trait "Age" can be directed used, trait "Sex" can be used after experssed as 0 and 1. Now, I am still confused on how to encode the trait "TNM Stage" after comprehensive search on google. Can it be treated as a single trait and expressed as 0,1,2 and 3 for Stage I, II, III and IV respectively? Or it is mandatory to split the Stage into four traits(Stage I, II, III and IV) and expressed as 0 and 1 for each trait?

Sorry for my unexperienced trouble. Thanks a lot for any sugesstions!

WGCNA RNA-Seq • 2.1k views
ADD COMMENT
1
Entering edit mode
4.3 years ago

If it's for WGCNA, then use 0, 1, 2, 3.

Kevin

ADD COMMENT
0
Entering edit mode

Thank you for your help. You've been most kind.

ADD REPLY
2
Entering edit mode

Hi, Also I suggest reading below short note of Professor Peter Langfelder about categorical variables. As you know he is one of the main authors of WGCNA:

https://peterlangfelder.com/2018/11/25/working-with-categorical-variables/

Mohammad

ADD REPLY
1
Entering edit mode

Thank you Mohammad

ADD REPLY
1
Entering edit mode

Thank you Mohammad

ADD REPLY
0
Entering edit mode

Thank you, Mohammad! I read thoroughly the note. Professor Peter Langfelder offered some valuable sugesstions such as creating binary indicators for the various comparisons. The note mainly concerned the categorical variable with more than two levels, such as ethnicity. However, I am more confused about the ordinal varible with more than two levels. I tend to agree with Kevin. Thank you again!

ADD REPLY
0
Entering edit mode

I have a similar question with you but my clinical traits is cell development timepoint (Day0, Day2, Day5 and Day15). I wonder did you get your expected result after you treated TNM Stage as 0, 1, 2 and 3? If so, I will do the same thing: treat Day0, Day2, Day5 and Day15 as 0, 1, 2 and 3. Thanks!

ADD REPLY
0
Entering edit mode

You can encode these 'Days' as numerical values. Otherwise, perhaps try to construct a logistic regression model where you are regressing Day to WGCNA Module.

ADD REPLY

Login before adding your answer.

Traffic: 2637 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