{"id":631,"date":"2020-06-10T11:21:55","date_gmt":"2020-06-10T11:21:55","guid":{"rendered":"https:\/\/ricovictor.com\/?p=631"},"modified":"2020-06-10T11:33:50","modified_gmt":"2020-06-10T11:33:50","slug":"multicolinealidad-en-r-como-detectarla","status":"publish","type":"post","link":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/","title":{"rendered":"Multicolinealidad en R. \u00bfC\u00f3mo detectarla?"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"631\" class=\"elementor elementor-631\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ff2ecbf elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ff2ecbf\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e524bef\" data-id=\"e524bef\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f69e33e elementor-widget elementor-widget-spacer\" data-id=\"f69e33e\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-90d2551 elementor-widget elementor-widget-text-editor\" data-id=\"90d2551\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span class=\"_5mfr\"><span class=\"_6qdm\">\ud83d\udc8e <\/span><\/span>La <strong>multicolinealidad<\/strong> se da cuando, entre las variables del modelo que estamos desarrollando hay una <strong>alta <\/strong>correlaci\u00f3n.<\/p><p>Quiero recalcar que la correlaci\u00f3n debe ser muy alta ya que es muy normal,sobre todo en variables financieras que exista alg\u00fan tipo de relaci\u00f3n en sus movimientos.<\/p><p>Adem\u00e1s, cuando creamos <strong>modelos econom\u00e9tricos<\/strong> la existencia de multicolinealidad en s\u00ed no debe ser problema, el problema viene cuando esta es ya muy fuerte y entonces puede que el modelo deje de ser fiable.<\/p><p>La multicolinealidad puede dar lugar a la aparici\u00f3n de algunos efectos perjudiciales para nuestros modelos. Los m\u00e1s importantes son:<\/p><ol><li>\u00a0<strong>Aumento de las varianzas<\/strong> de los estimadores de los coeficientes de regresi\u00f3n<\/li><li>Estimaciones sensibles al <strong>tama\u00f1o de la muestra<\/strong> .<\/li><\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-dec96fa elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"dec96fa\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9091721\" data-id=\"9091721\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-65aa8e5 elementor-widget elementor-widget-text-editor\" data-id=\"65aa8e5\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h3><strong>Pruebas para detectar la multicolinealidad<\/strong><\/h3>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-6c90833 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6c90833\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-7a1bf6d\" data-id=\"7a1bf6d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7e4beb2 elementor-widget elementor-widget-text-editor\" data-id=\"7e4beb2\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Existen muchas formas de analizar si hay colinealidad en los modelos.Algunas de ellas son:<\/p><ul><li><strong>Coeficiente de Correlaci\u00f3n alto entre variables<\/strong><\/li><li><strong>Coeficientes t&#8217;s no significativos y R2 elevada<\/strong><\/li><li><strong>Factor de Influencia de la Varianza<\/strong><\/li><li><strong>Regla y Efecto R2 de Theil<\/strong><\/li><li><strong>\u00cdndice de la condici\u00f3n de n\u00famero<\/strong><\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-ae352a2\" data-id=\"ae352a2\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-83bc945 elementor-view-stacked elementor-shape-circle elementor-widget elementor-widget-icon\" data-id=\"83bc945\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-tools\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3d79966 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3d79966\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4e3ee5e\" data-id=\"4e3ee5e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4804447 elementor-widget elementor-widget-text-editor\" data-id=\"4804447\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\ud83e\uddd0 En el siguiente video amplio esta informaci\u00f3n, incluyendo el desarrollo de manera pr\u00e1ctica de un <strong>modelo de regresi\u00f3n en R<\/strong> y luego comprobando la existencia de multicolinealidad con algunas de las pruebas nombradas. Tambi\u00e9n dejo aqu\u00ed el <strong>c\u00f3digo<\/strong> usado para que puedas copiarlo y practicar por t\u00ed mismo si lo deseas.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-3551559 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3551559\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-9c9398e\" data-id=\"9c9398e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e7cb5a7 elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"e7cb5a7\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-arrow-circle-down\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-47f9e9d\" data-id=\"47f9e9d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-25a417e elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"25a417e\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-arrow-circle-down\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f3cdcdc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f3cdcdc\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f678ac8\" data-id=\"f678ac8\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a4c7a93 elementor-widget elementor-widget-video\" data-id=\"a4c7a93\" data-element_type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=ZzxmJZc7c5k&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0cc912e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0cc912e\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-db9531e\" data-id=\"db9531e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e4cff53 elementor-widget-divider--view-line elementor-widget elementor-widget-divider\" data-id=\"e4cff53\" data-element_type=\"widget\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e2940e6 elementor-widget elementor-widget-text-editor\" data-id=\"e2940e6\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\u00a0<\/p><h2><span style=\"text-decoration: underline;\"><em><strong>C\u00d3DIGO EN R DEL V\u00cdDEO<\/strong><\/em><\/span><\/h2><p>\u00a0<\/p><p><strong>#VIDEO MULTICOLINEALIDAD<\/strong><\/p><p><strong>## variables altamente correlacionadas<\/strong><br \/><strong>## problema s\u00f3lo cuando la correlaci\u00f3n es muy fuerte<\/strong><br \/><strong>## Caso extremo &#8212; Multicolinealidad Perfecta<\/strong><br \/><strong>## coef de 1 &#8212; *rango completo de la matriz de regresores<\/strong><br \/><strong>## &#8212; y matri X&#8217;X tenga determinante 0<\/strong><\/p><p><strong>### + colinealidad &#8211; Disminuye determinante y + varianza estimad<\/strong><\/p><p><strong>#EFECTOS DE MULTICOLINEALIDAD APROX<\/strong><\/p><p><strong>#1. Sensibilidad a la muestra <\/strong><br \/><strong>#2. Aumentos de las varianzas<\/strong><\/p><p><strong>##Pruebas para detectarla<\/strong><\/p><p><strong># 1. Correlaci\u00f3n entre variables &#8212; &gt; 0.8<\/strong><br \/><strong># 2. Coeficientes t&#8217;s no significativos y R2 elevada<\/strong><br \/><strong># 3. Factor de Influencia de la Varianza (VIF)<\/strong><\/p><p><strong># 4. Efecto y Regla de Klein<\/strong><br \/><strong># 5 .Indice de condici\u00f3n de n\u00famero &#8230; matrices<\/strong><\/p><p><strong>####<\/strong><\/p><p><strong>## PARTE 1 &#8212; CREACI\u00d3N DEL MODELO LINEAL<\/strong><\/p><p><strong>#install.packages(\u00abquantmod\u00bb)<\/strong><br \/><strong>library(quantmod)<\/strong><br \/><strong>#install.packages(\u00abtseries\u00bb)<\/strong><br \/><strong>library(tseries)<\/strong><br \/><strong>#install.packages(\u00abforecast\u00bb)<\/strong><br \/><strong>library(forecast)<\/strong><br \/><strong>#install.packages(\u00abTSA\u00bb)<\/strong><br \/><strong>library(TSA)<\/strong><br \/><strong>#install.packages(\u00abQuandl\u00bb)<\/strong><br \/><strong>library(Quandl)<\/strong><\/p><p><strong>#1. Descargamos las variables que vamos a usar<\/strong><\/p><p><strong>getSymbols(\u00abINDPRO\u00bb,src=\u00bbFRED\u00bb) #Industrial Production Index<\/strong><br \/><strong>getSymbols(\u00abUMCSENT\u00bb,src=\u00bbFRED\u00bb) #University of Michigan: Consumer Sentiment<\/strong><br \/><strong>getSymbols(\u00abFEDFUNDS\u00bb,src=\u00bbFRED\u00bb) #tasa interes fondos federales<\/strong><br \/><strong>getSymbols(\u00abCCRETT01USM661N\u00bb,src=\u00bbFRED\u00bb) #Tipo de cambio efectivo IPC<\/strong><br \/><strong>getSymbols(\u00abM2NS\u00bb,src=\u00bbFRED\u00bb) #Stock de dinero M2<\/strong><br \/><strong>getSymbols(\u00abPAYEMS\u00bb,src=\u00bbFRED\u00bb) # Des trabajadores no rurales<\/strong><br \/><strong>getSymbols(\u00abBOPGSTB\u00bb,src=\u00bbFRED\u00bb) #Balance cuenta, Diferencia entre exp e imp<\/strong><br \/><strong>getSymbols(\u00abEXUSUK\u00bb,src=\u00bbFRED\u00bb) #GBP mensual<\/strong><\/p><p><strong>## Predecir GBPUSD &#8212; 1 mes<\/strong><\/p><p><strong>###2. Dividimos lso datos en 2 muestras<\/strong><br \/><strong>## IN SAMPLE y OUT SAMPLE<\/strong><\/p><p><strong>prod= INDPRO[\u00ab2001-01::2019-12\u00bb]<\/strong><br \/><strong>sent= UMCSENT[\u00ab2001-01::2019-12\u00bb]<\/strong><br \/><strong>Fedfunds=FEDFUNDS[\u00ab2001-01::2019-12\u00bb]<\/strong><br \/><strong>GBP=EXUSUK[\u00ab2001-01::2019-12\u00bb]<\/strong><br \/><strong>credit=CCRETT01USM661N[\u00ab2001-01::2019-12\u00bb]<\/strong><br \/><strong>pay=PAYEMS[\u00ab2001-01::2019-12\u00bb]<\/strong><br \/><strong>money=M2NS[\u00ab2001-01::2019-12\u00bb]<\/strong><br \/><strong>trade=BOPGSTB[\u00ab2001-01::2019-12\u00bb]<\/strong><\/p><p><strong>#creamos una tabla<\/strong><\/p><p><strong>t_varibles=data.frame(merge(sent,Fedfunds,GBP,credit,pay,money,trade))<\/strong><\/p><p><strong>#creamos el modelo<\/strong><\/p><p><strong>Mod_Macro = lm(EXUSUK~UMCSENT+FEDFUNDS+CCRETT01USM661N+PAYEMS+M2NS+BOPGSTB,data=t_varibles)<\/strong><\/p><p><strong>summary(Mod_Macro)<\/strong><\/p><p><strong>####<\/strong><\/p><p><strong># 1 Correlaci\u00f3n<\/strong><\/p><p><strong>cor(t_varibles)<\/strong><\/p><p><strong>### Modelo 2 &#8212;<\/strong><\/p><p><strong>t_varibles_2=data.frame(merge(GBP,pay,money,trade))<\/strong><\/p><p><strong>Mod_Macro_2 = lm(EXUSUK~PAYEMS+M2NS+BOPGSTB,data=t_varibles_2)<\/strong><\/p><p><strong>summary(Mod_Macro_2)<\/strong><\/p><p><strong>#1.correlacion<\/strong><\/p><p><strong>cor(t_varibles_2)<\/strong><\/p><p><strong># Mira Pr(&gt;|t|) y Adjusted R-squared<\/strong><\/p><p><strong># 3 Factor de Influencia de Varianza<\/strong><\/p><p><strong>#\u2663install.packages(\u00abcar\u00bb)<\/strong><br \/><strong>library(car)<\/strong><\/p><p><strong>#2. Factor de Influencia de la Varianza<\/strong><\/p><p><strong>#fiv &lt;- 1\/1-R2<\/strong><\/p><p><strong>vif(Mod_Macro_2)<\/strong><\/p><p><strong>#5&#8211; &gt;0.8<\/strong><br \/><strong>#10 &gt; 0.9<\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\ud83d\udc8e La multicolinealidad se da cuando, entre las variables del modelo que estamos desarrollando hay una alta correlaci\u00f3n. Quiero recalcar que la correlaci\u00f3n debe ser muy alta ya que es muy normal,sobre todo en variables financieras que exista alg\u00fan tipo de relaci\u00f3n en sus movimientos. Adem\u00e1s, cuando creamos modelos econom\u00e9tricos la existencia de multicolinealidad en &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/\"> <span class=\"screen-reader-text\">Multicolinealidad en R. \u00bfC\u00f3mo detectarla?<\/span> Leer m\u00e1s &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":632,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[2,13],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Multicolinealidad en R. \u00bfC\u00f3mo detectarla? - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Multicolinealidad en R. \u00bfC\u00f3mo detectarla? - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\" \/>\n<meta property=\"og:description\" content=\"\ud83d\udc8e La multicolinealidad se da cuando, entre las variables del modelo que estamos desarrollando hay una alta correlaci\u00f3n. Quiero recalcar que la correlaci\u00f3n debe ser muy alta ya que es muy normal,sobre todo en variables financieras que exista alg\u00fan tipo de relaci\u00f3n en sus movimientos. Adem\u00e1s, cuando creamos modelos econom\u00e9tricos la existencia de multicolinealidad en &hellip; Multicolinealidad en R. \u00bfC\u00f3mo detectarla? Leer m\u00e1s &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/\" \/>\n<meta property=\"og:site_name\" content=\"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/VictorRicoA\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-10T11:21:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-10T11:33:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ricovictor.com\/wp-content\/uploads\/2020\/06\/fractal-2090592_640.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"359\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Victor A.Rico\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/www.twitter.com\/RicoVictor_\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Victor A.Rico\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/\"},\"author\":{\"name\":\"Victor A.Rico\",\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/person\/019a6d632b4c12d438e84d000f68ae38\"},\"headline\":\"Multicolinealidad en R. \u00bfC\u00f3mo detectarla?\",\"datePublished\":\"2020-06-10T11:21:55+00:00\",\"dateModified\":\"2020-06-10T11:33:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/\"},\"wordCount\":611,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ricovictor.com\/#organization\"},\"articleSection\":[\"Econometr\u00eda y Estad\u00edstica\",\"R studio\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/\",\"url\":\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/\",\"name\":\"Multicolinealidad en R. \u00bfC\u00f3mo detectarla? - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\",\"isPartOf\":{\"@id\":\"https:\/\/ricovictor.com\/#website\"},\"datePublished\":\"2020-06-10T11:21:55+00:00\",\"dateModified\":\"2020-06-10T11:33:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/ricovictor.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multicolinealidad en R. \u00bfC\u00f3mo detectarla?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ricovictor.com\/#website\",\"url\":\"https:\/\/ricovictor.com\/\",\"name\":\"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/ricovictor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ricovictor.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ricovictor.com\/#organization\",\"name\":\"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\",\"url\":\"https:\/\/ricovictor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2026\/02\/cropped-ChatGPT-Image-4-feb-2026-12_41_28.png\",\"contentUrl\":\"https:\/\/ricovictor.com\/wp-content\/uploads\/2026\/02\/cropped-ChatGPT-Image-4-feb-2026-12_41_28.png\",\"width\":1402,\"height\":474,\"caption\":\"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas\"},\"image\":{\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/person\/019a6d632b4c12d438e84d000f68ae38\",\"name\":\"Victor A.Rico\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/ricovictor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/aafb747906a8c3309189616a81e1481e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/aafb747906a8c3309189616a81e1481e?s=96&d=mm&r=g\",\"caption\":\"Victor A.Rico\"},\"description\":\"Diplomado en Ciencias Empresariales y Operador del Mercado Espa\u00f1ol de Futuros y Opciones\",\"sameAs\":[\"https:\/\/www.facebook.com\/VictorRicoA\/\",\"https:\/\/www.instagram.com\/victor_a.rico\",\"https:\/\/www.linkedin.com\/in\/ricovictor\/\",\"https:\/\/twitter.com\/https:\/\/www.twitter.com\/RicoVictor_\",\"https:\/\/www.youtube.com\/VictorARico\"],\"url\":\"https:\/\/ricovictor.com\/index.php\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Multicolinealidad en R. \u00bfC\u00f3mo detectarla? - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","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:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/","og_locale":"es_ES","og_type":"article","og_title":"Multicolinealidad en R. \u00bfC\u00f3mo detectarla? - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","og_description":"\ud83d\udc8e La multicolinealidad se da cuando, entre las variables del modelo que estamos desarrollando hay una alta correlaci\u00f3n. Quiero recalcar que la correlaci\u00f3n debe ser muy alta ya que es muy normal,sobre todo en variables financieras que exista alg\u00fan tipo de relaci\u00f3n en sus movimientos. Adem\u00e1s, cuando creamos modelos econom\u00e9tricos la existencia de multicolinealidad en &hellip; Multicolinealidad en R. \u00bfC\u00f3mo detectarla? Leer m\u00e1s &raquo;","og_url":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/","og_site_name":"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","article_author":"https:\/\/www.facebook.com\/VictorRicoA\/","article_published_time":"2020-06-10T11:21:55+00:00","article_modified_time":"2020-06-10T11:33:50+00:00","og_image":[{"width":640,"height":359,"url":"https:\/\/ricovictor.com\/wp-content\/uploads\/2020\/06\/fractal-2090592_640.jpg","type":"image\/jpeg"}],"author":"Victor A.Rico","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/www.twitter.com\/RicoVictor_","twitter_misc":{"Escrito por":"Victor A.Rico","Tiempo de lectura":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/#article","isPartOf":{"@id":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/"},"author":{"name":"Victor A.Rico","@id":"https:\/\/ricovictor.com\/#\/schema\/person\/019a6d632b4c12d438e84d000f68ae38"},"headline":"Multicolinealidad en R. \u00bfC\u00f3mo detectarla?","datePublished":"2020-06-10T11:21:55+00:00","dateModified":"2020-06-10T11:33:50+00:00","mainEntityOfPage":{"@id":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/"},"wordCount":611,"commentCount":0,"publisher":{"@id":"https:\/\/ricovictor.com\/#organization"},"articleSection":["Econometr\u00eda y Estad\u00edstica","R studio"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/","url":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/","name":"Multicolinealidad en R. \u00bfC\u00f3mo detectarla? - V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","isPartOf":{"@id":"https:\/\/ricovictor.com\/#website"},"datePublished":"2020-06-10T11:21:55+00:00","dateModified":"2020-06-10T11:33:50+00:00","breadcrumb":{"@id":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ricovictor.com\/index.php\/2020\/06\/10\/multicolinealidad-en-r-como-detectarla\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/ricovictor.com\/"},{"@type":"ListItem","position":2,"name":"Multicolinealidad en R. \u00bfC\u00f3mo detectarla?"}]},{"@type":"WebSite","@id":"https:\/\/ricovictor.com\/#website","url":"https:\/\/ricovictor.com\/","name":"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","description":"","publisher":{"@id":"https:\/\/ricovictor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ricovictor.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/ricovictor.com\/#organization","name":"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas","url":"https:\/\/ricovictor.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/ricovictor.com\/#\/schema\/logo\/image\/","url":"https:\/\/ricovictor.com\/wp-content\/uploads\/2026\/02\/cropped-ChatGPT-Image-4-feb-2026-12_41_28.png","contentUrl":"https:\/\/ricovictor.com\/wp-content\/uploads\/2026\/02\/cropped-ChatGPT-Image-4-feb-2026-12_41_28.png","width":1402,"height":474,"caption":"V\u00edctor A. Rico \u2014 Econometr\u00eda y Finanzas Cuantitativas"},"image":{"@id":"https:\/\/ricovictor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/ricovictor.com\/#\/schema\/person\/019a6d632b4c12d438e84d000f68ae38","name":"Victor A.Rico","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/ricovictor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/aafb747906a8c3309189616a81e1481e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aafb747906a8c3309189616a81e1481e?s=96&d=mm&r=g","caption":"Victor A.Rico"},"description":"Diplomado en Ciencias Empresariales y Operador del Mercado Espa\u00f1ol de Futuros y Opciones","sameAs":["https:\/\/www.facebook.com\/VictorRicoA\/","https:\/\/www.instagram.com\/victor_a.rico","https:\/\/www.linkedin.com\/in\/ricovictor\/","https:\/\/twitter.com\/https:\/\/www.twitter.com\/RicoVictor_","https:\/\/www.youtube.com\/VictorARico"],"url":"https:\/\/ricovictor.com\/index.php\/author\/admin\/"}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/posts\/631"}],"collection":[{"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/comments?post=631"}],"version-history":[{"count":9,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/posts\/631\/revisions"}],"predecessor-version":[{"id":642,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/posts\/631\/revisions\/642"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/media\/632"}],"wp:attachment":[{"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/media?parent=631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/categories?post=631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ricovictor.com\/index.php\/wp-json\/wp\/v2\/tags?post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}