{"id":204013,"date":"2024-04-09T12:20:16","date_gmt":"2024-04-09T16:20:16","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=204013"},"modified":"2024-04-09T12:20:17","modified_gmt":"2024-04-09T16:20:17","slug":"r-statix-the-power-of-correlations-in-r","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/","title":{"rendered":"R-Statix: The Power of Correlations in R"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">First edition.<br>Roberto Delgado Castro<br>Data Scientistl and Compliance Officer<br>robdelcas @ gmail.com<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-introduction\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most known and used statistical tools is correlations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Correlations are performed to find out levels of relations between two or more objects, variables or situations, in order to extract insights that bring explanations about the reasons why such objects or variables are, or not, related to each other.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The usage of correlations, in general terms, brings along the development of quantitative coefficients. The most famous are the Pearson and Spearman coefficients. These metrics are used to quantify the correlation analysis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The correlation analysis could be applied to find relevant insights in daily business tasks or projects. Furthermore, it could be applied to find explanations for why determined business phenomena occur. Beyond, correlations could be used to solve problems in a wide variety of issues that appear daily in organizations, no matter their size, nature, type of operations, location or origin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>This article is based on the contents of my most recently published book: <strong>Correlations in R<\/strong>. (Free download from <a href=\"https:\/\/roberto-delgado.com\/\">https:\/\/roberto-delgado.com\/<\/a>)<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-correlation\">Correlation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Shao, Shirvan and Alamer (2022) express that \u201cunderstanding the association between theoretical constructs is at the heart of quantitative research. Researchers use correlation to understand how two or more variables are associated. The relationship between variables is usually obtained by assessing how measures\/scales that represent the variables are correlated. Analysts rarely use single items to represent a complex phenomenon because single items cannot appropriately capture the complexity inherent in theoretical concepts\u201d .<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, Prasad (2023) indicates that \u201ccorrelation and regression are the techniques which are used to investigate if there is a relationship between two quantitative variables. Correlation answers three questions\u2014is there a relationship, what is the strength of relationship and direction of the relationship? Regression expresses this relationship in a mathematical form so that the equation can be used for predicting other values. However, correlation does not deal with causation, that is even a high degree of correlation cannot be used to confirm which is the cause and which is the effect variable. However, this condition is clearly defined in \u201cregression or connection between two or more things. A more formal definition says, correlation is a statistical method used to assess a possible association between two or more variables\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In these same ideas, Makowski, Ben-Shachar, Patil and L\u00fcdecke (2020), point out that \u201ccorrelations tests are arguably one of the most commonly used statistical procedures, and are used as a basis in many applications such as exploratory data analysis, structural modelling, data engineering etc.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore, according to the mentioned authors, the heart of correlation is finding some levels of association between two or more variables. At this point, it is possible to break down its definition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, a statistical-quantitative method or procedure must be performed. Second, researchers must find two or more variables, that could be objects, data sets or any other phenomenon. Third, such an association could be explained by the calculation of some coefficients. Fourth, the variables under analysis, in the majority of cases, are data sets or time-series-data made of information that have been collected within time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-normality-tests\">Normality tests<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Khatun (2021) expresses that \u201cnormality tests are used in different sectors\u201d. Also, Das and Imon (2016), expresses that \u201cin statistics it is conventional to assume that the observations are normal. The entire statistical framework is grounded on this assumption and if this assumption is violated the inference breaks down. For this reason it is essential to check or test this assumption before any statistical analysis of data\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, Ahmad and Khan (2015), points that \u201cstandard statistical procedures often require data to be normally distributed and the results of these methods will be inappropriate when the assumption of normality is not satisfied. Therefore, the postulation of normality is strictly required before proceeding statistical analysis. Many parametric methods (like correlation, regression, t \u2013test, analysis of variance etc) require normality assumption. The assumption of normality is one of the most important assumptions of parametric procedures because of its extensive range of practical applications\u201d. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, Ahmand and Khan also pointed that \u201cresearchers developed many tests for the comparison of normality assumption in different years; some tests were modified for attaining better performance. Firstly, Pearson (1900) developed chi-square test for detection of non-normality. Kolmogrov and Smirnov (1933) suggested formal test for normality. The chi square test, based on acumulative distribution function, and can be used for any univariant distribution. After two decades, Anderson and Darling proposed their test for normality. Kuiper (1960) brought out the test of normality. Afterwards, Shapiro and Wilk (1965) suggested test of normality. In 1968, Ajne normality test was developed. After two years later, a modification of Kuiper and Ajne tests was proposed by Stephens (1970). D\u2019Agostino (1972) introduced another test of normality. In the same year, modification of Kolmogrov Smirnov was proposed by Stephens. Four years later, Vasicek\u2019s test of normality proposed by Vasicek (1976). Jarque and Bera designed a test of normality in 1987\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore, Hernandez (2021) expresses that \u201c determining whether or not a data sample has been obtained from a normally-distributed population is a common practice in statistics and data analysis. Up to this date, several dozens of methods have been proposed in the scientific literature for testing normality\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">According to the bibliography reviewed so far related with normality tests, from a pure statistical point of view, before applying any quantitative processing applied to a determined data set or variable, it is recommended to perform any kind of normality test, in order to determine whether or not such data set (variable) is normal or not.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Why?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dagnino (2014) states that &#8220;many times, when two variables that change together are measured, it is possible to determine which is independent and which is dependent. In these circumstances, it is only possible to describe the strength of association between them, since not causal predictions or estimates can be made\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From this point on, the work of comparing and relating two variables constitutes one of the most used and common scientific works in the world of research and statistics. The collection of data for the construction of time series on particular variables, and the development of coefficients that quantify the association between them, are one of the cornerstones in what is known as Linear Regression.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fiallos (2021) states that &#8220;the most common numerical index used to measure a correlation is the &#8220;Pearson Coefficient&#8221;. Pearson&#8217;s Coefficient (also called the product-momentum correlation coefficient), is represented by the symbol &#8220;r&#8221; and provides a numerical measure of the correlation between two quantitative variables. This coefficient has the following characteristics:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>It tells us whether two variables are correlated or not.<\/li>\n\n\n\n<li>It tells us whether the apparent relationship is positive or negative.<\/li>\n\n\n\n<li>The coefficient sign denotes the strength or intensity of the correlation between the variables&#8221;.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">It is particularly important to note that, if the data collected is parametric and numerical and follow a normal distribution trend, Pearson&#8217;s Coefficient should be used. On the other hand, if you are working with data that is not parametric or follows a normal distribution trend, it is best to use, among others, the so-called Spearman&#8217;s Coefficient. As Pinilla and Rico (2021) put it, &#8220;analyses based on Pearson&#8217;s Coefficient are known as parametric, and those based on Spearman&#8217;s Coefficient are known as non-parametric&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-correlation-coefficients-pearson-and-spearman\">Correlation coefficients: Pearson and Spearman<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">According to Schober, Boer and Schwarte (2018), \u201cthe Pearson correlation coefficient is typically used for jointly normally distributed data (data that follow a bivariate normal distribution). For nonnormally distributed continuous data, for ordinal data, or for data with relevant outliers, a Spearman rank correlation can be used as a measure of a monotonic association. Both correlation coefficients are scaled such that they range from \u20131 to +1, where 0 indicates that there is no linear or monotonic association, and the relationship gets stronger and ultimately approaches a straight line (Pearson correlation) or a constantly increasing or decreasing curve (Spearman correlation) as the coefficient approaches an absolute value of 1. Hypothesis tests and confidence intervals can be used to address the statistical significance of the results and to estimate the strength of the relationship in the population from which the data were sampled\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Specifically in <em>R<\/em>, due to the functions of the package RSTATIX, Shapiro-Wilk normality tests and Pearson and Spearman coefficients could be calculated using a certain code structure. Within the next sections of this book, a proper code structure is proposed in order to perform such calculations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-rstatix-package\">RStatix package<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">According with the formal prospect, \u201cRSTATIX package is a pipe-friendly framework for basic statistical tests\u201d. Provides a simple and intuitive pipe-friendly framework, coherent with the &#8216;tidyverse&#8217; design philosophy, for performing basic statistical tests, including t-test, Wilcoxon test, ANOVA, Kruskal- Wallis and correlation analyses. The output of each test is automatically transformed into a tidy data frame to facilitate visualization. The package contains helper functions for identifying univariate and multivariate outliers, assessing normality and homogeneity of variances\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-correlations-in-r-proposed-check-list-using-r-statix\">Correlations in R: proposed check list using R-Statix<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The following image shows the suggested process of correlation analysis:<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><strong>Image 1<br>Correlation analysis in R<br>Recommended process diagram<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1100\" height=\"619\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/04\/R-Statix-Diagram_Article5-1100x619.jpg\" alt=\"\" class=\"wp-image-204672 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/04\/R-Statix-Diagram_Article5-1100x619.jpg 1100w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/04\/R-Statix-Diagram_Article5-700x394.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/04\/R-Statix-Diagram_Article5-300x169.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/04\/R-Statix-Diagram_Article5-768x432.jpg 768w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/04\/R-Statix-Diagram_Article5.jpg 1280w\" data-sizes=\"(max-width: 1100px) 100vw, 1100px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/619;\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install R-Statix package: library(rstatix)<\/li>\n\n\n\n<li>Input data in R (ingest) using read(r) function.<\/li>\n\n\n\n<li>Run Shapiro-Wilk normality tests using Shapiro_test function, applied to variables under analysis.<\/li>\n\n\n\n<li>Compare results of normality tests within variables under analysis.<\/li>\n\n\n\n<li>Calculate correlation coefficients to variables under analysis, depending on normality tests results for each:<br>o Pearson Coefficient: cor.metod = Pearson<br>o Spearman Coefficient: cor.metod = Spearman.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-closure\">Closure<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The use of statistics provides real data on complex situations rather than making decisions based on assumptions. A manager must have the ability to look at data and make predictions about the future of the company or a particular department. Nowadays, every decision must be supported by concrete empirical data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Correlations could be applied in business analytics. Some of its uses could be:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Data exploratory analysis.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Predictions and data modeling.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, correlation is a powerful statistical tool that helps researchers to discover associations and relations between variables. When they examine the strength and the association between two or more variables, the correlation analysis lets them obtain crucial information about behaviors, preferences, tendencies of processes and markets.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-references\">References<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Shao, K., Elahi Shirvan, M., &amp; Alamer, A. (2022). How accurate is your correlation? Different methods derive different results and different interpretations. Frontiers in Psychology, 13, 901412.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prasad, S. (2023). Correlation and Regression. In Elementary Statistical Methods (pp. 241-279). Singapore: Springer Nature Singapore.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Makowski, D., Ben-Shachar, M. S., Patil, I., &amp; L\u00fcdecke, D. (2020). Methods and algorithms for correlation analysis in R. Journal of Open Source Software, 5(51), 2306.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Khatun, N. (2021). Applications of normality test in statistical analysis. Open Journal of Statistics, 11(01), 113.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Das, K. R., &amp; Imon, A. H. M. R. (2016). A brief review of tests for normality. American Journal of Theoretical and Applied Statistics, 5(1), 5-12.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ahmad, F., &amp; Khan, R. A. (2015). A power comparison of various normality tests. Pakistan Journal of Statistics and Operation Research, 331-345.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hernandez, H. (2021). Testing for normality: What is the best method. ForsChem Research Reports, 6, 2021-05.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dagnino, J. (2014). Coeficiente de correlaci\u00f3n lineal de Pearson. Chil Anest, 43(1), 150-153.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fiallos, G. (2021). La Correlaci\u00f3n de Pearson y el proceso de regresi\u00f3n por el M\u00e9todo de M\u00ednimos Cuadrados. Ciencia Latina Revista Cient\u00edfica Multidisciplinar, 5(3), 2491-2509.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pinilla, J. O., &amp; Rico, A. F. O. (2021). \u00bfPearson y Spearman, coeficientes intercambiables? Comunicaciones en Estad\u00edstica, 14(1), 53-63.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Schober, P., Boer, C., &amp; Schwarte, L. A. (2018). Correlation coefficients: appropriate use and interpretation. Anesthesia &amp; analgesia, 126(5), 1763-1768.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">R-Statix package prospect. Updated February 1st, 2023. <br>URL: <a href=\"https:\/\/cran.r-project.org\/web\/packages\/rstatix\/index.html\">https:\/\/cran.r-project.org\/web\/packages\/rstatix\/index.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>See below for other Data Science articles from Roberto Delgado Castro:<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"\/campus\/ibkr-quant-news\/absolute-and-relative-time-the-impact-of-data-science\/\">Absolute and Relative Time: The Impact of Data Science<\/a><\/li>\n\n\n\n<li><a href=\"\/campus\/ibkr-quant-news\/rudder-casting-defining-the-heart-of-a-data-warehouse\/\">Rudder Casting: Defining the Heart of a Data Warehouse<\/a><\/li>\n\n\n\n<li><a href=\"\/campus\/ibkr-quant-news\/r-quarto-new-boundary-in-financial-reporting-services\/\">R Quarto<sup>\u00a9<\/sup>: New Boundary In Financial Reporting Services<\/a><\/li>\n\n\n\n<li><a href=\"\/campus\/ibkr-quant-news\/pivot-tables-in-r-for-financial-analysis-of-public-trusts-in-costa-rica\/\">Pivot Tables in R For Financial Analysis of Public Trusts in Costa Rica<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The usage of correlations, in general terms, brings along the development of quantitative coefficients. The most famous are the Pearson and Spearman coefficients.<\/p>\n","protected":false},"author":1183,"featured_media":38395,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,338,342],"tags":[16975,9337,806,487,16973,6591,16974,1045],"contributors-categories":[15500],"class_list":["post-204013","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-programing-languages","category-ibkr-quant-news","category-r-development","tag-data-exploratory-analysis","tag-data-modeling","tag-data-science","tag-r","tag-rstatix-package","tag-rstats","tag-shapiro-wilk-normality-test","tag-tidyverse","contributors-categories-roberto-delgado-castro"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v28.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>R-Statix: The Power of Correlations in R | IBKR Quant<\/title>\n<meta name=\"description\" content=\"The usage of correlations, in general terms, brings along the development of quantitative coefficients. The most famous are the Pearson and Spearman...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/204013\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R-Statix: The Power of Correlations in R\" \/>\n<meta property=\"og:description\" content=\"The usage of correlations, in general terms, brings along the development of quantitative coefficients. The most famous are the Pearson and Spearman coefficients.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-09T16:20:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-09T16:20:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/spiral-math.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"505\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Roberto Delgado Castro\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roberto Delgado Castro\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Roberto Delgado Castro\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/4bc3448cd870697e6b63127fa96ae32d\"\n\t            },\n\t            \"headline\": \"R-Statix: The Power of Correlations in R\",\n\t            \"datePublished\": \"2024-04-09T16:20:16+00:00\",\n\t            \"dateModified\": \"2024-04-09T16:20:17+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/\"\n\t            },\n\t            \"wordCount\": 1958,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/03\\\/spiral-math.jpg\",\n\t            \"keywords\": [\n\t                \"Data Exploratory Analysis\",\n\t                \"Data Modeling\",\n\t                \"Data Science\",\n\t                \"R\",\n\t                \"RStatix package\",\n\t                \"rstats\",\n\t                \"Shapiro-Wilk normality test\",\n\t                \"tidyverse\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Quant\",\n\t                \"R Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/\",\n\t            \"name\": \"R-Statix: The Power of Correlations in R | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/03\\\/spiral-math.jpg\",\n\t            \"datePublished\": \"2024-04-09T16:20:16+00:00\",\n\t            \"dateModified\": \"2024-04-09T16:20:17+00:00\",\n\t            \"description\": \"The usage of correlations, in general terms, brings along the development of quantitative coefficients. The most famous are the Pearson and Spearman coefficients.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/r-statix-the-power-of-correlations-in-r\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/03\\\/spiral-math.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/03\\\/spiral-math.jpg\",\n\t            \"width\": 800,\n\t            \"height\": 505,\n\t            \"caption\": \"Quant\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/4bc3448cd870697e6b63127fa96ae32d\",\n\t            \"name\": \"Roberto Delgado Castro\",\n\t            \"description\": \"Roberto Delgado Castro is a data professional and compliance officer of the Direccion General de Desarrollo Social y Asignaciones Familiares (DESAF), which is part of the Ministry of Labor and Social Security of Costa Rica. He has degrees in finance and banking, marketing and sales and management. He also holds a specialization in E-Learning. For the last ten years, he has developed important data science projects in DESAF, as well as in Costa Rica\u00b4s government. He is the author of the books DT Quantum Model, which proposes a quantitative model to calculate and evaluate the digital transformation process of an organization, Metadatology, which is a brand-new technical discipline focused on the study and analysis of Metadata, and Correlations in R, which proposes a check-list to perform correlation analyses using the RSTATIX package in R. https:\\\/\\\/roberto-delgado.com\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/roberto-delgado-castro\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"R-Statix: The Power of Correlations in R | IBKR Quant","description":"The usage of correlations, in general terms, brings along the development of quantitative coefficients. The most famous are the Pearson and Spearman...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/204013\/","og_locale":"en_US","og_type":"article","og_title":"R-Statix: The Power of Correlations in R","og_description":"The usage of correlations, in general terms, brings along the development of quantitative coefficients. The most famous are the Pearson and Spearman coefficients.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/","og_site_name":"IBKR Campus US","article_published_time":"2024-04-09T16:20:16+00:00","article_modified_time":"2024-04-09T16:20:17+00:00","og_image":[{"width":800,"height":505,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/spiral-math.jpg","type":"image\/jpeg"}],"author":"Roberto Delgado Castro","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Roberto Delgado Castro","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/#article","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/"},"author":{"name":"Roberto Delgado Castro","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/4bc3448cd870697e6b63127fa96ae32d"},"headline":"R-Statix: The Power of Correlations in R","datePublished":"2024-04-09T16:20:16+00:00","dateModified":"2024-04-09T16:20:17+00:00","mainEntityOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/"},"wordCount":1958,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/spiral-math.jpg","keywords":["Data Exploratory Analysis","Data Modeling","Data Science","R","RStatix package","rstats","Shapiro-Wilk normality test","tidyverse"],"articleSection":["Data Science","Programming Languages","Quant","R Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/","url":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/","name":"R-Statix: The Power of Correlations in R | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/#primaryimage"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/spiral-math.jpg","datePublished":"2024-04-09T16:20:16+00:00","dateModified":"2024-04-09T16:20:17+00:00","description":"The usage of correlations, in general terms, brings along the development of quantitative coefficients. The most famous are the Pearson and Spearman coefficients.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/r-statix-the-power-of-correlations-in-r\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/spiral-math.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/spiral-math.jpg","width":800,"height":505,"caption":"Quant"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/4bc3448cd870697e6b63127fa96ae32d","name":"Roberto Delgado Castro","description":"Roberto Delgado Castro is a data professional and compliance officer of the Direccion General de Desarrollo Social y Asignaciones Familiares (DESAF), which is part of the Ministry of Labor and Social Security of Costa Rica. He has degrees in finance and banking, marketing and sales and management. He also holds a specialization in E-Learning. For the last ten years, he has developed important data science projects in DESAF, as well as in Costa Rica\u00b4s government. He is the author of the books DT Quantum Model, which proposes a quantitative model to calculate and evaluate the digital transformation process of an organization, Metadatology, which is a brand-new technical discipline focused on the study and analysis of Metadata, and Correlations in R, which proposes a check-list to perform correlation analyses using the RSTATIX package in R. https:\/\/roberto-delgado.com","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/roberto-delgado-castro\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/spiral-math.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/204013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/1183"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=204013"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/204013\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/38395"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=204013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=204013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=204013"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=204013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}