Closed mattdpalm closed 2 years ago
Yes, but you probably should not do Pearson correlations with categorical variables with more than 2 levels.
Thanks, Sarah
Stat Studio Website: www.cehs.usu.edu/StatStudiohttp://www.cehs.usu.edu/StatStudio Professional Website: www.SarahSchwartzStats.comhttp://www.sarahschwartzstats.com/ Stat Studio Appointment Manager: Book Herehttps://cehsam.usu.edu/ramonline/BookAppt?C=C&T=P&P=149 Zoom (video conferencing): https://usu.zoom.us/my/statstudio ORS Feedback & Satisfaction Survey: Found Herehttps://is.gd/CEHS_ORS_feedback
From: mattdpalm @.> Sent: Thursday, December 16, 2021 11:02 AM To: martinctc/rwa @.> Cc: Subscribed @.***> Subject: [EXT] [martinctc/rwa] X not numeric (Issue #13)
Hello,
I am getting the error
"Error in cor(thedata, use = "pairwise.complete.obs") : 'x' must be numeric"
Do all categorical variables need to be converted to numbers? Thank you,
— Reply to this email directly, view it on GitHubhttps://github.com/martinctc/rwa/issues/13, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AETROBKBFVM3WZTAP57MAR3URISRDANCNFSM5KG6GQMA. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>> CAUTION: This email originated from outside of USU. If this appears to be a USU employee, beware of impersonators. Do not click links, reply, download images, or open attachments unless you verify the sender’s identity and know the content is safe.
Thanks for the question @mattdpalm - yes @SarBearSchwartz is correct, the current functions only accept numeric variables.
Hi—If I convert all categorical variables into a series of numeric indicators (0/1) would it work then? Thank you! On Sun, 19 Dec 2021 at 4:24 am, Martin Chan @.***> wrote:
Thanks for the question @mattdpalm https://github.com/mattdpalm - yes @SarBearSchwartz https://github.com/SarBearSchwartz is correct, the current functions only accept numeric variables.
— Reply to this email directly, view it on GitHub https://github.com/martinctc/rwa/issues/13#issuecomment-997356406, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANK54X3H52HYHOP76HHFK3DURWQGTANCNFSM5KG6GQMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Hello,
I am getting the error
"Error in cor(thedata, use = "pairwise.complete.obs") : 'x' must be numeric"
Do all categorical variables need to be converted to numbers? Thank you,