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

Поділитися
Вставка
  • Опубліковано 10 бер 2021
  • 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.

КОМЕНТАРІ • 57

  • @muhammadkhubaib5666
    @muhammadkhubaib5666 3 роки тому +1

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

  • @thangamaninmamit-civil6860
    @thangamaninmamit-civil6860 3 роки тому +2

    Excellent work, really useful

  • @girijaprasadpatnaik2113
    @girijaprasadpatnaik2113 2 роки тому

    Great help sir !

  • @demigod4504
    @demigod4504 5 місяців тому +1

    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)

  • @souravdebnath8551
    @souravdebnath8551 2 роки тому

    Nice one thanks

  • @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?

  • @ghd_henu
    @ghd_henu 2 роки тому +1

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

  • @bolormaatsedenish6123
    @bolormaatsedenish6123 3 місяці тому

    thank you

  • @rwaewae
    @rwaewae 2 роки тому +1

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

  • @andreifrancojimenez7714
    @andreifrancojimenez7714 Рік тому

    Thanks!

  • @waqarazeemjadoon
    @waqarazeemjadoon 10 місяців тому +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  10 місяців тому +1

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

    • @waqarazeemjadoon
      @waqarazeemjadoon 10 місяців тому

      @@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 10 місяців тому

      @@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

  • @geovenkat
    @geovenkat 4 місяці тому

    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'

  • @dr.muhammadnaveed4136
    @dr.muhammadnaveed4136 3 роки тому

    Good

  • @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 2 роки тому

      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.

  • @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?

  • @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.

  • @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

  • @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]!"

  • @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?

  • @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.

  • @kamalbenali1260
    @kamalbenali1260 Рік тому

    Could not find function corrplot?

  • @gishue975
    @gishue975 3 роки тому

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

  • @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