Partial correlation with multiple control variables

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 7

  • @vipulwagh7520
    @vipulwagh7520 5 месяцев назад

    Hey, thanks for the tutorial. So, would data from the 3rd column onwards be treated as confounding variables in this function?

    • @statorials
      @statorials  5 месяцев назад

      Hey, thanks for the feedback. Actually, all variables within the data frame will be considered when doing correlations. Hence, the correlation table you will get from pcor() will have controlled for the correlation with all other variables within that same table.
      Cheers, Björn.

    • @vipulwagh7520
      @vipulwagh7520 5 месяцев назад

      @@statorials Thanks for your response again. Yes, I tried doing it on my own and it did have a correlation for all the variable. And if I have understood it correctly, any correlation value we look at is adjusted for other variables. In my case it was age and sex.

    • @statorials
      @statorials  5 месяцев назад

      You're welcome! You understood correctly. I would only add one thing. If gender is dichotomous, you should be fine (usually the case). If categorical variables have more than 3 values, a partial correlation will not work properly though. Pearson and Spearman work with dichotomous variables only.
      Best Regards, Björn.

    • @vipulwagh7520
      @vipulwagh7520 5 месяцев назад +1

      @@statorials That's an important information. I will keep that in mind. Thank you once again.

  • @a.sparkle5157
    @a.sparkle5157 10 месяцев назад

    Hi! Great Tutorial! Thanks a lot! Can you do the same for a semi partial correlation? So conducting a semi partail correlation controlled for multiple other variables?

    • @statorials
      @statorials  10 месяцев назад

      Hi, thanks for your positive feedback!
      You mean something like this: ruclips.net/video/zDJu5XmqHTo/видео.html
      Best Regards, Björn.