This is a test version of Biostars. For the public version, visit https://www.biostars.org.
WGCNA categorical trait with more than 2 levels.

Hi there!

Is it possible to use categorical traits (such as ethnicity) in WGCNA analysis? If so, shall we encode them with 0s and 1s? what if the trait is not binary and has several levels? Perhaps use 1, 2, 3,4?

Thank you in advance

wgcna categorical trait

2 answers

You can use categorical variables, if it is binary, then you can expressed it as 0 and 1. If it has more levels then you can separate each level as an individual binary variable.

This link may help

WGCNA works on correlation measure. You can not use categorical variables in WGCNA analysis. You need to have quantitative variables (samples) with a number of samples at least 15 for reliable results.

Thank you @Renesh for your response.

Log in to answer this question.