R Programming for beginners | Correlation Matrix in R using Cor package

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • How to use Cor function in R Studio.
    How to draw correlation matrix using Pearson, Kendell and Spearman methods.
    How to draw different shapes of correlation matrix.

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

  • @demigod4504
    @demigod4504 7 месяцев назад +2

    Thanks for the video Sir. I have to use a colorRampPalette to see colors on the plot.
    corrplot (Time, method = "color", col = colorRampPalette(c("blue", "white", "red"))(200),
    type = "upper", order = "hclust", addCoef.col = "black",
    tl.col = "black", tl.srt = 45, diag = FALSE)

  • @muhammadkhubaib5666
    @muhammadkhubaib5666 3 года назад +1

    excellent work I tried your code and it works, eager for more videos from your side....

  • @Auni03
    @Auni03 2 года назад +2

    it was really a great help thank you so much for giving very simple and precise details.

    • @Tota-tj5oh
      @Tota-tj5oh Год назад

      I don’t work with my data?

  • @girijaprasadpatnaik2113
    @girijaprasadpatnaik2113 2 года назад

    Great help sir !

  • @waqarazeemjadoon
    @waqarazeemjadoon Год назад +1

    Thank you very much, I am a big fan of R and wanted to use it for quite long. Your this video made things very easy. However, it would be so nice of you, if you let me know how to highlight significant values in correlation and the confidence level (eg 99.99% or 95%). Secondly, do you have any video on PCA/FA and Cluster Analysis in R using water quality data?

    • @softwaresforcivilengineeri7947
      @softwaresforcivilengineeri7947  Год назад +1

      Thank you, Just update the values portion, please send me the your code, and query, i will update them for you.

    • @waqarazeemjadoon
      @waqarazeemjadoon Год назад

      @@softwaresforcivilengineeri7947
      I am using the code you developed, however, I just want to add the significant values or star on in final diagram. The code is given below.
      > corrplot(m, method=“color”, col = col(200), type = “upper”, order= “hclust”, addCoef.col = “black”, tl.col = “black”, tl.srt = 45, diag = FALSE)

    • @waqarazeemjadoon
      @waqarazeemjadoon Год назад

      @@softwaresforcivilengineeri7947 similarly, used your code for box wicker plots and it worked well. However, can you help to show the box plots using logarithmic y axis. Because in my case some of values are too small and some other too large and box plots with small cant be seen properly. The log scale can solve this issue

  • @hope2024-g
    @hope2024-g 2 года назад +1

    Thank you Sir for your nice tutorial. How can I put asterisk (***) in the method argument instead of number please?

  • @rwaewae
    @rwaewae 2 года назад +1

    how can we combine summary of statistics and correlation plot in one diagram. thanx

  • @souravdebnath8551
    @souravdebnath8551 3 года назад

    Nice one thanks

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

    thank you

  • @geovenkat
    @geovenkat 7 месяцев назад

    nice video very useful but i got this following error how to solve corrplot(m,method = "color",col(200),type = "upper", order = "hclust", addCoef.col = "black", tl.col = "black", tl.srt = 45, diag = FALSE)
    Error in col(200) : a matrix-like object is required as argument to 'col'

  • @andreifrancojimenez7714
    @andreifrancojimenez7714 Год назад

    Thanks!

  • @endrishussen5495
    @endrishussen5495 Год назад +1

    Aselamua'leyikum werahmetulah, I ahve sort of data would you help me by analysing the correlation between variables by using R software

  • @karmatempa133
    @karmatempa133 3 года назад +1

    I am facing attach error. When I type attach(correlation_matrix), correlation_matrix is not listed in drop down list. Kindly help.

    • @softwaresforcivilengineeri7947
      @softwaresforcivilengineeri7947  3 года назад

      correlation_matrix is basically my data name. if you have the data in excel format. just upload it to R in the same manner. and you can give it the name correlation matrix.

  • @doubanstella457
    @doubanstella457 Год назад

    I found this error , can you help ? "Error in corrplot::corrplot(HVI_Indicators_2021, method = "number") :
    The matrix is not in [-1, 1]!"

  • @dr.muhammadnaveed4136
    @dr.muhammadnaveed4136 3 года назад

    Good

  • @karmatempa133
    @karmatempa133 3 года назад +1

    Sir,
    Kindly help me solve following issue:
    Error in attach(correlation_matrix) :
    object 'correlation_matrix' not found
    Thanks in advance!!

    • @softwaresforcivilengineeri7947
      @softwaresforcivilengineeri7947  3 года назад

      correlation_matrix is basically my data name. if you have the data in excel format. just upload it to R in the same manner. and you can give it the name correlation matrix.

    • @karmatempa133
      @karmatempa133 3 года назад

      @@softwaresforcivilengineeri7947 Thank You.

    • @girijaprasadpatnaik2113
      @girijaprasadpatnaik2113 2 года назад

      Thank you for the question and answer ❣️

  • @dr.mohdaamir6688
    @dr.mohdaamir6688 Год назад

    Can u please make a videos on Gene expression Analysis using R packages from base to advance ??

  • @daveandrew
    @daveandrew Год назад

    Nice. I successfully create the circle, number, and pie. But, the last one the upper triangle; it did not work by showing : Error in col(200) : a matrix-like object is required as argument to 'col'. Kindly help

    • @daveandrew
      @daveandrew Год назад

      Can you send or copy here the comment/script for the upper triangle one please

    • @softwaresforcivilengineeri7947
      @softwaresforcivilengineeri7947  Год назад

      @@daveandrew Thank you for your comments, first please save the col(200) type with a unique variable e.g "colour=col(200) and then run the above code. Also install the concerned packages used for colors.

    • @daveandrew
      @daveandrew Год назад

      @@softwaresforcivilengineeri7947 thank you. Do you have a video to create circular plot in R?

  • @share4care604
    @share4care604 3 года назад

    Sir
    Please tell me in which condition we use Pearson, spearman,and Kendall correlation?

    • @softwaresforcivilengineeri7947
      @softwaresforcivilengineeri7947  3 года назад

      when you do not mention the type of correlation to R. it will take Pearson correlation by default. But if you want to draw another type of correlation, then you need to mention that type. the only difference is in the formula. if you want the detail I will share them with you.

    • @Darkossamael
      @Darkossamael 3 года назад

      When should you use Pearson, Spearman or other?

    • @cintiacristinadacostafreir7694
      @cintiacristinadacostafreir7694 Год назад

      @@softwaresforcivilengineeri7947 Hi!! I want to draw Spearman correlation, how do i do this mention in R?

    • @softwaresforcivilengineeri7947
      @softwaresforcivilengineeri7947  Год назад

      @@cintiacristinadacostafreir7694 just type spearman instead of Pearson.

  • @jasminstariolo1514
    @jasminstariolo1514 2 года назад

    Sir, first of all I'd like to thank you for this correlation matrix video. It has been really usefull.
    Please help me with the following error:
    > cor(dados, method = "spearman") #"dados" is my data name
    Error in cor(dados, method = "spearman") : 'x' must be numeric

    • @softwaresforcivilengineeri7947
      @softwaresforcivilengineeri7947  2 года назад

      Please arrange your data. i think your data have some non numeric values. All the rows and columns of the data must be numeric. if then you face the problem please share your data.

  • @amirrezafotovvat3051
    @amirrezafotovvat3051 2 года назад

    Hello. Thanks for your great video. When I tried the code for upper matrix type, I got this error: Error in col(200) : a matrix-like object is required as argument to 'col'
    Would you please help me figure out the reason?

  • @kamalbenali1260
    @kamalbenali1260 2 года назад

    Could not find function corrplot?

  • @aarizahmed4514
    @aarizahmed4514 3 года назад

    Please share video on lag1 auto-corellation

  • @sudhirKumar-ru3tu
    @sudhirKumar-ru3tu 3 года назад

    Please share the R code... such demo are of no use if you really teach

    • @softwaresforcivilengineeri7947
      @softwaresforcivilengineeri7947  3 года назад +2

      Dear if you see the video, the R code is there.. But if you want the same code.. From now i will share the code also

    • @rajendraa
      @rajendraa 3 года назад +1

      @@softwaresforcivilengineeri7947 we are seeing your video and keeping seeing

  • @gishue975
    @gishue975 3 года назад

    Sir, I have Error in col = col(200), please help me?