lhe17 / nebula

GNU General Public License v2.0
28 stars 6 forks source link

Do we have to scale and center all the covariates/predictors before feeding them to NEBULA? #13

Closed MANZHAOHUI closed 1 year ago

MANZHAOHUI commented 1 year ago

Hi Liang, In my analysis, I have covariates of very different scales. Do we have to scale them before feeding them to NEBULA? And for categorical values, I wonder if NEBULA can accept them in the design matrix or we have to convert them into numerical ones.
Thank you. Zhaohui Man

lhe17 commented 1 year ago

Hi Man,

You can scale your variables if you want to directly compare their fold changes across these variables. Otherwise, it is not necessary.

Regarding categorical variables, the function model.matrix will automatically convert them into dummy variables. But if your categorical variables are not nominal but ordinal, then you might consider converting them into numerical ones.

Best regards,

Liang

On 12/12/2022 8:19 PM, ZHAOHUI MAN wrote:

Hi Liang, In my analysis, I have covariates of very different scales. Do we have to scale them before feeding them to NEBULA? And for categorical values, I wonder if NEBULA can accept them in the design matrix or we have to convert them into numerical ones. Thank you. Zhaohui Man

— Reply to this email directly, view it on GitHub https://github.com/lhe17/nebula/issues/13, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDISUWC3UQT2QYKCPWNINTWM53EBANCNFSM6AAAAAAS4J6XQI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

MANZHAOHUI commented 1 year ago

Thank you very much.