Mide cómo se mueven juntas tus variables, y dilo bienMeasure how your variables move together, and say it right
Más de ochenta medidas calculadas, y casi cien explicadas, en un solo lugar: de Pearson, Spearman y Kendall a las robustas, las de dependencia no lineal, las parciales, las de variables categóricas y latentes, las de acuerdo y las de datos en el tiempo, el espacio o los círculos. Cada resultado dice qué convenio usó, cada fórmula se explica, y las figuras salen listas para publicar. Todo en tu navegador: sin instalar nada y sin que tus datos salgan de tu computadora.More than eighty measures computed, and nearly a hundred explained, in one place: from Pearson, Spearman and Kendall to the robust ones, those of nonlinear dependence, the partial ones, those for categorical and latent variables, those of agreement and those for data in time, space or on the circle. Every result says which convention it used, every formula is explained, and the figures come out ready to publish. All in your browser: nothing to install and your data never leave your computer.
Cómo funcionaHow it works
La ruta es la de un análisis de correlación bien hecho, en el orden en que se hace. Cada bloque explica la idea, revisa si tus datos la sostienen y dice qué conviene hacer después.The route is that of a correlation analysis done right, in the order it is done. Each block explains the idea, checks whether your data can support it and says what to do next.
Pruébalo: seis laboratorios que calculan de verdadTry it: six labs that really compute
Nada de esto es una animación grabada: cada movimiento recalcula, con el mismo motor que la app usará con tus datos, cada coeficiente y su valor p.None of this is a recorded animation: every move recomputes, with the same engine the app will use on your data, every coefficient and its p-value.
Los trece bloquesThe thirteen blocks
Un bloque es un paso del análisis y un capítulo del manual: se recorren en orden, y cada uno dice si conviene volver a uno anterior.A block is a step of the analysis and a chapter of the manual: they are walked in order, and each one says when it is worth going back to an earlier one.
Qué medida para qué datosWhich measure for which data
El tipo de las dos variables decide qué coeficientes tienen sentido. El asistente del Bloque 2 lo propone solo; aquí está el mapa completo.The kind of the two variables decides which coefficients make sense. The assistant of Block 2 proposes it on its own; here is the whole map.
Nueve formas de dibujar una correlaciónNine ways to draw a correlation
En una matriz, cada celda es un glifo. Todos llevan el signo también en su forma, no sólo en el color: con una paleta divergente, +r y −r se imprimen con el mismo gris. La media luna es propia de esta app: un disco de tamaño fijo cuya parte iluminada es exactamente |r|, creciente si r > 0 y menguante si r < 0. Mueve el control para ver los nueve con el mismo r.In a matrix, each cell is a glyph. All of them carry the sign in their shape too, not only in the color: with a divergent palette, +r and −r print as the same gray. The moon is this app’s own: a disk of fixed size whose lit part is exactly |r|, waxing if r > 0 and waning if r < 0. Move the control to see all nine with the same r.
Paletas propias, probadasOwn palettes, tested
Diecinueve paletas diseñadas para esta app en un espacio de color perceptual (pasos iguales de r se ven como pasos iguales de color), con nombres de plantas, lugares y artesanías de México. Cada una pasa cinco controles: que todo su recorrido quepa en la pantalla, que sus pasos sean uniformes, que el signo se distinga con los tres tipos de daltonismo, que +r y −r tengan el mismo gris y que sus extremos contrasten con el fondo. Elige una: se usará en toda la app.Nineteen palettes designed for this app in a perceptual color space (equal steps of r look like equal steps of color), named after plants, places and crafts of Mexico. Each one passes five checks: its whole ramp fits the screen, its steps are uniform, the sign is told apart with the three kinds of color blindness, +r and −r have the same gray and its ends contrast with the background. Pick one: it will be used throughout the app.
Cómo se escriben los númerosHow the numbers are written
Los manuales de estilo no se ponen de acuerdo: el de psicología quita el cero inicial (r = .45), las guías biomédicas lo conservan y escriben P mayúscula, y la norma mexicana de unidades exige el cero y admite la coma decimal. Elige el tuyo: la app escribe así cada número, en la pantalla y en el informe.Style manuals do not agree: the psychology manual drops the leading zero (r = .45), the biomedical guidelines keep it and write a capital P, and the Mexican standard of units requires the zero and admits the decimal comma. Pick yours: the app writes every number that way, on screen and in the report.
Las medidas y de dónde vienenThe measures and where they come from
Cada ficha trae su fórmula, qué mide, su prueba, su intervalo, sus trampas y el artículo que la define. El informe del Bloque 13 cita sólo las que hayas usado.Each card has its formula, what it measures, its test, its interval, its pitfalls and the paper that defines it. The report of Block 13 cites only those you used.
La teoría, en lenguaje llanoThe theory, in plain words
Las ideas que sostienen todo lo demás. Cada una dice en qué bloque se usa.The ideas that hold up everything else. Each one says in which block it is used.
Qué tan grandes pueden ser tus datosHow large your data can be
Medido en una computadora de escritorio con el mismo motor que corre en tu navegador.Measured on a desktop computer with the same engine that runs in your browser.
Lo que este programa no haceWhat this program does not do
ReferenciasReferences
Los artículos y libros que definen cada medida, cada prueba, cada figura y cada convenio de la app.The papers and books that define every measure, test, figure and convention of the app.
Ver todas las referenciasSee every reference
Cómo citarHow to cite
Si este programa te sirvió para un trabajo publicado, cítalo así:If this program helped with a published work, cite it as:
BibTeXBibTeX
DatosData
Cargar, revisar el tipo de cada columna y elegir el coeficienteLoad, check the kind of each column and choose the coefficient
Abrir datosOpen data
Una fila por observación y una columna por variable, con los nombres en la primera fila. Tus datos no salen de tu computadora.One row per observation and one column per variable, with the names in the first row. Your data never leave your computer.
Opciones de lecturaReading options
Conjuntos de dominio públicoPublic-domain datasets
Datos reales, publicados hace mucho o por gobiernos, con su fuente. Cada uno sirve para algo distinto.Real data, published long ago or by governments, with their source. Each one is good for something different.
Tus datosYour data
Tipo y papel de cada columnaKind and role of each column
Cada tipo se dedujo de los datos y de los nombres, y dice por qué. Cámbialo si no es así: el tipo decide qué coeficientes tienen sentido y el papel, cómo se usa la columna.Each kind was deduced from the data and the names, and says why. Change it if it is not right: the kind decides which coefficients make sense and the role, how the column is used.
Datos faltantesMissing data
TransformarTransform
Cada transformación crea una columna nueva y deja la original como estaba.Each transformation creates a new column and leaves the original as it was.
¿Qué correlación uso?Which correlation should I use?
Elige dos columnas: el asistente mira su tipo y, si son continuas, la forma de su nube (atípicos, curvatura, empates, si sube y baja), y propone las medidas en orden, con la razón de cada una.Pick two columns: the assistant looks at their kind and, if they are continuous, the shape of their cloud (outliers, curvature, ties, whether it rises and falls), and proposes the measures in order, with the reason for each.
GuardarSave
Los datos con las columnas que creaste, en texto separado por comas (UTF-8).The data with the columns you created, as comma-separated text (UTF-8).
Exploración y supuestosExploration and assumptions
Mirar antes de medir: la forma de cada variable y de cada parLook before you measure: the shape of each variable and of each pair
Primero abre unos datos en el Bloque 2 (o usa un conjunto de ejemplo).First open some data in Block 2 (or use an example dataset).
Qué explorarWhat to explore
Las variables numéricas (continuas y ordinales) con papel «variable». Elige hasta diez; un grupo colorea los puntos y muestra la r dentro de cada grupo.The numeric variables (continuous and ordinal) with the role “variable”. Pick up to ten; a group colors the points and shows r within each group.
Matriz de dispersiónScatterplot matrix
Abajo, cada nube (la variable de la fila en el eje vertical); en la diagonal, la distribución; arriba, r con sus estrellas (* p < .05, ** < .01, *** < .001) y ρ debajo. Haz clic en una celda para estudiar ese par.Below, each cloud (the row variable on the vertical axis); on the diagonal, the distribution; above, r with its stars (* p < .05, ** < .01, *** < .001) and ρ underneath. Click a cell to study that pair.
Cada variableEach variable
La r de Pearson describe una relación sin pedir normalidad; lo que la pide es su prueba clásica y su intervalo de Fisher (la normalidad conjunta de las dos). Con muestras grandes las pruebas rechazan desviaciones sin importancia: manda la gráfica Q–Q.Pearson’s r describes a relation without asking for normality; what asks for it is its classical test and its Fisher interval (the joint normality of the two). With large samples the tests reject unimportant departures: the Q–Q plot rules.
Las pruebas, en breveThe tests, briefly
Shapiro–Wilk (1965) compara los datos ordenados con lo que se esperaría de una normal; W cerca de 1 es normal. Su valor p sigue la aproximación de Royston (1995), válida de 3 a 5000 datos. Anderson–Darling mide la distancia entre la distribución empírica y la normal ajustada, con más peso en las colas, y su valor p es el de Stephens (D’Agostino y Stephens 1986). La asimetría g₁ y la curtosis en exceso g₂ dicen en qué se aparta: |g₁| > 1 o |g₂| > 2 ya importan para la prueba de r.Shapiro–Wilk (1965) compares the ordered data with what a normal would give; W near 1 is normal. Its p-value follows Royston’s approximation (1995), valid for 3 to 5,000 values. Anderson–Darling measures the distance between the empirical distribution and the fitted normal, weighting the tails more, with Stephens’ p-value (D’Agostino and Stephens 1986). Skewness g₁ and excess kurtosis g₂ say how it departs: |g₁| > 1 or |g₂| > 2 already matter for the test of r.
Normalidad conjunta y atípicos multivariadosJoint normality and multivariate outliers
Que cada variable sea normal no basta: la normal multivariada pide además que sus combinaciones lo sean. La gráfica compara las distancias de Mahalanobis al cuadrado con los cuantiles de χ²: en una normal, los puntos siguen la diagonal.Each variable being normal is not enough: the multivariate normal also asks that their combinations be normal. The plot compares the squared Mahalanobis distances with the χ² quantiles: under a normal, the points follow the diagonal.
Clásica frente a robustaClassical against robust
La distancia clásica usa la media y la covarianza de todos los datos, y los atípicos las inflan hasta esconderse (el efecto de enmascaramiento). La robusta usa el estimador ortogonalizado de Gnanadesikan–Kettenring (Maronna y Zamar 2002) con escalas τ y un repesado que deja fuera lo que pasa del corte: los atípicos quedan lejos. Mardia (1970) prueba la asimetría y la curtosis multivariadas; Henze–Zirkler (1990) compara la función característica empírica con la normal y es consistente contra cualquier alternativa.The classical distance uses the mean and covariance of all the data, and outliers inflate them until they hide (the masking effect). The robust one uses the orthogonalized Gnanadesikan–Kettenring estimator (Maronna and Zamar 2002) with τ-scales and a reweighting that leaves out what passes the cut: outliers stay far. Mardia (1970) tests multivariate skewness and kurtosis; Henze–Zirkler (1990) compares the empirical characteristic function with the normal and is consistent against any alternative.
Cada par: supuestos y coeficiente recomendadoEach pair: assumptions and recommended coefficient
Curvatura: el término cuadrático sobre la recta. Dispersión: Breusch–Pagan estudentizada. Influencia: lo más que cambia r al quitar un solo punto. Haz clic en una fila para ver el par.Curvature: the quadratic term over the line. Spread: studentized Breusch–Pagan. Influence: the most r changes when a single point is removed. Click a row to see the pair.
El par elegidoThe chosen pair
Por qué cada supuestoWhy each assumption
Linealidad. r mide sólo la parte recta de la relación; si la nube se curva pero sigue subiendo, ρ o τ la miden completa; si sube y baja, ni r ni ρ la ven (Anscombe 1973). Dispersión constante. Cuando la nube se abre en abanico, el error estándar de r que da la fórmula clásica es incorrecto: el valor p por permutación y el intervalo por bootstrap no dependen de ello. Atípicos e influencia. Un solo punto puede crear o borrar una correlación; si r cambia más de un error estándar al quitarlo, ese punto decide demasiado. Grupos. Juntar grupos con medias distintas puede invertir el signo de la relación (Simpson 1951).Linearity. r measures only the straight part of the relation; if the cloud curves but keeps rising, ρ or τ measure all of it; if it rises and falls, neither r nor ρ sees it (Anscombe 1973). Constant spread. When the cloud opens like a fan, the standard error of r given by the classical formula is wrong: the permutation p-value and the bootstrap interval do not depend on it. Outliers and influence. A single point can create or erase a correlation; if r changes by more than one standard error when it is removed, that point decides too much. Groups. Pooling groups with different means can reverse the sign of the relation (Simpson 1951).
Un par a fondoOne pair in depth
Todos los coeficientes, sus pruebas, sus intervalos y la evidencia, en palabrasEvery coefficient, its tests, its intervals and the evidence, in words
Primero abre unos datos en el Bloque 2 (o usa un conjunto de ejemplo).First open some data in Block 2 (or use an example dataset).
El par y la preguntaThe pair and the question
ResultadoResult
La nube y sus rangosThe cloud and its ranks
A la izquierda los datos con la elipse del 95 %, la recta y el LOWESS; a la derecha los mismos puntos convertidos en rangos (lo que ven ρ y τ): una relación monótona curva se vuelve recta.On the left the data with the 95% ellipse, the line and LOWESS; on the right the same points turned into ranks (what ρ and τ see): a curved monotonic relation becomes straight.
Todos los coeficientes, lado a ladoEvery coefficient, side by side
Cada uno con su prueba propia (exacta, asintótica o por permutación) y su intervalo: analítico donde existe, bootstrap percentil donde no. Las medidas de dependencia (dCor, ξ, D, τ*) van de 0 (independencia) a 1 y no tienen signo; ξ y D pueden quedar un poco por debajo de 0 cuando no hay relación.Each with its own test (exact, asymptotic or by permutation) and its interval: analytic where one exists, percentile bootstrap where not. The dependence measures (dCor, ξ, D, τ*) run from 0 (independence) to 1 and have no sign; ξ and D can fall slightly below 0 when there is no relation.
Remuestreo: bootstrap y permutaciónResampling: bootstrap and permutation
Qué hace cada intervaloWhat each interval does
El bootstrap (Efron 1979) remuestrea los pares con reemplazo y recalcula el coeficiente miles de veces: la dispersión de esas réplicas imita la del coeficiente de muestra en muestra. El intervalo percentil toma sus cuantiles; el básico los refleja alrededor de la estimación; el normal usa su error estándar; el BCa (Efron 1987) corrige además el sesgo (z₀) y que la dispersión cambie con el valor (la aceleración a, de la navaja). Con datos normales el intervalo de Fisher cubre lo prometido; con datos muy asimétricos se queda corto y los intervalos bootstrap se acercan más al nivel pedido, sin llegar del todo con muestras chicas (Bishara y Hittner 2017; la simulación de la validación de este bloque lo repite). La permutación (Pitman 1937) baraja Y contra X: rompe cualquier relación y conserva todo lo demás, así que su valor p no supone normalidad.The bootstrap (Efron 1979) resamples the pairs with replacement and recomputes the coefficient thousands of times: the spread of those replicates imitates that of the coefficient from sample to sample. The percentile interval takes their quantiles; the basic one reflects them around the estimate; the normal one uses their standard error; BCa (Efron 1987) also corrects the bias (z₀) and a spread that changes with the value (the acceleration a, from the jackknife). With normal data Fisher’s interval covers what it promises; with very skewed data it falls short and the bootstrap intervals come closer to the requested level, without quite reaching it in small samples (Bishara and Hittner 2017; the simulation in this block’s validation repeats it). The permutation (Pitman 1937) shuffles Y against X: it breaks any relation and keeps everything else, so its p-value does not assume normality.
Factor de Bayes (r de Pearson)Bayes factor (Pearson’s r)
Cuántas veces más probables son los datos si hay correlación que si ρ = 0. La a priori sobre ρ es una beta estirada a (−1, 1); κ controla su ancho.How many times more probable the data are if there is a correlation than if ρ = 0. The prior on ρ is a beta stretched to (−1, 1); κ controls its width.
Cómo se calculaHow it is computed
Con las medias y varianzas integradas bajo las a priori de Jeffreys, la verosimilitud de ρ depende sólo de r y n: (1 − ρ²)^{(n−1)/2} (1 − ρr)^{3/2 − n} ₂F₁(½, ½; n − ½; (1 + ρr)/2) (Ly, Verhagen y Wagenmakers 2016). El factor de Bayes es su promedio bajo la a priori dividido entre su valor en ρ = 0, y coincide con la razón de densidades posterior/a priori en ρ = 0 (Savage–Dickey): los dos puntos de la gráfica. Las categorías de evidencia son las de Jeffreys (1961) como las tabulan Lee y Wagenmakers (2013).With the means and variances integrated out under Jeffreys’ priors, the likelihood of ρ depends only on r and n: (1 − ρ²)^{(n−1)/2} (1 − ρr)^{3/2 − n} ₂F₁(½, ½; n − ½; (1 + ρr)/2) (Ly, Verhagen and Wagenmakers 2016). The Bayes factor is its average under the prior divided by its value at ρ = 0, and equals the ratio of posterior to prior densities at ρ = 0 (Savage–Dickey): the two dots of the plot. The categories of evidence are Jeffreys’ (1961) as tabulated by Lee and Wagenmakers (2013).
Cómo se calculóHow it was computed
Matriz de correlaciónCorrelation matrix
Todas contra todas, con sus pruebas, su diagnóstico y la figura que se publicaAll against all, with their tests, their diagnosis and the figure that gets published
Primero abre unos datos en el Bloque 2 (o usa un conjunto de ejemplo).First open some data in Block 2 (or use an example dataset).
Qué correlacionarWhat to correlate
La matrizThe matrix
Glifos, orden y pruebas múltiplesGlyphs, order and multiple tests
Cada glifo codifica r de otra manera: la elipse es la forma de una nube con esa correlación (Murdoch y Chow 1996), la media luna y el pastel muestran |r| como fracción, el color y el sombreado (Friendly 2002) leen bien a distancia, el número es exacto. El orden importa: agrupar las variables parecidas revela bloques que el orden de los datos esconde. Con p variables hay p(p − 1)/2 pruebas: sin corregir, al 5 % se esperan falsos positivos; Holm controla la probabilidad de tener alguno y Benjamini–Hochberg la proporción entre los descubrimientos.Each glyph encodes r differently: the ellipse is the shape of a cloud with that correlation (Murdoch and Chow 1996), the moon and the pie show |r| as a fraction, color and shading (Friendly 2002) read well from afar, the number is exact. Order matters: grouping similar variables reveals blocks that the order of the data hides. With p variables there are p(p − 1)/2 tests: without correction, false positives are expected at 5%; Holm controls the probability of having any and Benjamini–Hochberg their proportion among the discoveries.
¿Es una matriz de correlación válida?Is it a valid correlation matrix?
Una matriz de correlación debe ser definida positiva (todos sus valores propios mayores que cero). Con faltantes por pares, con coeficientes robustos o con más variables que filas puede no serlo, y entonces no sirve para regresión, análisis factorial ni simulación.A correlation matrix must be positive definite (all its eigenvalues above zero). With pairwise missing data, robust coefficients or more variables than rows it may not be, and then it cannot be used for regression, factor analysis or simulation.
Para un análisis factorial: KMO y BartlettFor a factor analysis: KMO and Bartlett
La medida de Kaiser–Meyer–Olkin compara las correlaciones con las parciales: si las parciales son chicas, las variables comparten factores. La prueba de Bartlett pregunta si la matriz es la identidad (nada correlaciona).The Kaiser–Meyer–Olkin measure compares the correlations with the partial ones: if the partials are small, the variables share factors. Bartlett’s test asks whether the matrix is the identity (nothing correlates).
Tabla para publicarTable to publish
Dependencia no lineal y cópulasNonlinear dependence and copulas
Lo que una recta no ve: medidas que detectan cualquier forma y la estructura de la dependenciaWhat a line does not see: measures that detect any shape and the structure of the dependence
Primero abre unos datos en el Bloque 2 (o usa un conjunto de ejemplo).First open some data in Block 2 (or use an example dataset).
Un par: lo que ve cada medidaOne pair: what each measure sees
Qué mide cada unaWhat each one measures
La correlación de distancias (Székely, Rizzo y Bakirov 2007) es 0 sólo si hay independencia. El HSIC (Gretton et al. 2005) mide lo mismo en un espacio de funciones: con núcleos gaussianos, detecta cualquier relación. El MIC (Reshef et al. 2011) busca la rejilla que más información mutua capta, normalizada para que una función sin ruido de cualquier forma valga 1. La ξ de Chatterjee (2021) mide cuánto Y es función de X (no es simétrica). La información mutua (Kraskov et al. 2004) está en nats; su coeficiente de Linfoot √(1 − e^(−2I)) coincide con |ρ| en la normal bivariada. La correlación máxima (Gebelein 1941; Rényi 1959) es la mayor r entre transformaciones de X y de Y.The distance correlation (Székely, Rizzo and Bakirov 2007) is 0 only under independence. HSIC (Gretton et al. 2005) measures the same in a space of functions: with Gaussian kernels it detects any relation. MIC (Reshef et al. 2011) looks for the grid that captures the most mutual information, normalized so that a noiseless function of any shape scores 1. Chatterjee’s ξ (2021) measures how much Y is a function of X (it is not symmetric). Mutual information (Kraskov et al. 2004) is in nats; its Linfoot coefficient √(1 − e^(−2I)) equals |ρ| in the bivariate normal. The maximal correlation (Gebelein 1941; Rényi 1959) is the largest r between transformations of X and of Y.
Rastreo: lo que Pearson no veSweep: what Pearson misses
Todos los pares de las variables numéricas, ordenados por cuánto supera la correlación de distancias a |r|: arriba quedan las relaciones curvas, en U o con ciclos.Every pair of the numeric variables, ordered by how much the distance correlation exceeds |r|: curved, U-shaped or cyclic relations come first.
Cópulas: la forma de la dependenciaCopulas: the shape of the dependence
El teorema de Sklar (1959) separa cada variable de su dependencia: al pasar los datos a rangos (pseudo-observaciones) queda sólo la cópula. Se ajustan cinco familias; difieren sobre todo en las colas: ¿los valores extremos ocurren juntos?Sklar’s theorem (1959) separates each variable from its dependence: turning the data into ranks (pseudo-observations) leaves only the copula. Five families are fitted; they differ above all in the tails: do extreme values happen together?
Las familias y sus colasThe families and their tails
La gaussiana y la de Frank no tienen dependencia en las colas: los extremos se vuelven independientes. La t de Student tiene la misma en las dos colas, mayor cuanto menos grados de libertad. Clayton concentra la dependencia abajo (caen juntas) y Gumbel arriba (suben juntas). Se estiman por máxima pseudoverosimilitud (Genest, Ghoudi y Rivest 1995) y se comparan por AIC; la inversión de τ de Kendall da un valor de partida que no depende de las marginales. La dependencia en la cola λ es el límite de P(V > u | U > u) cuando u → 1 (Joe 1997); la empírica usa el 10 % superior e inferior.The Gaussian and Frank copulas have no tail dependence: extremes become independent. Student’s t has the same in both tails, larger with fewer degrees of freedom. Clayton concentrates the dependence at the bottom (they fall together) and Gumbel at the top (they rise together). They are estimated by maximum pseudo-likelihood (Genest, Ghoudi and Rivest 1995) and compared by AIC; the inversion of Kendall’s τ gives a starting value that does not depend on the margins. The tail dependence λ is the limit of P(V > u | U > u) as u → 1 (Joe 1997); the empirical one uses the top and bottom 10%.
Parcial, múltiple y entre conjuntosPartial, multiple and between sets
Controlar terceras variables y correlacionar grupos de variables entre síControl third variables and correlate groups of variables with each other
Primero abre unos datos en el Bloque 2 (o usa un conjunto de ejemplo).First open some data in Block 2 (or use an example dataset).
Correlación parcial y semiparcialPartial and semipartial correlation
¿Cuánto queda de la relación entre X e Y cuando se quita lo que ambas comparten con Z? La parcial quita Z de las dos; la semiparcial, sólo de Y.How much of the relation between X and Y is left once what both share with Z is removed? The partial removes Z from both; the semipartial, from Y only.
Correlación múltipleMultiple correlation
La correlación entre Y y la mejor combinación lineal de varias X. Las semiparciales al cuadrado separan lo que aporta cada predictor por sí solo de lo que comparten.The correlation between Y and the best linear combination of several X. The squared semipartials separate what each predictor adds on its own from what they share.
Correlación canónicaCanonical correlation
Dos conjuntos de variables: la mayor correlación posible entre una combinación lineal de cada uno, luego la siguiente, independiente de la primera, y así hasta el tamaño del menor conjunto (Hotelling 1936).Two sets of variables: the largest possible correlation between a linear combination of each, then the next one, independent of the first, and so on up to the size of the smaller set (Hotelling 1936).
Entre conjuntos: RV, Procrustes y MantelBetween sets: RV, Procrustes and Mantel
Con los mismos conjuntos A y B: el coeficiente RV es una r entre dos tablas (0 a 1); Procrustes gira una configuración para ajustarla a la otra; Mantel correlaciona las distancias entre las filas. Las tres con prueba por permutación (999 barajas, variables estandarizadas).With the same sets A and B: the RV coefficient is an r between two tables (0 to 1); Procrustes rotates one configuration to fit the other; Mantel correlates the distances between the rows. All three with a permutation test (999 shuffles, standardized variables).
Cuándo usar cada unaWhen to use each one
La canónica busca combinaciones lineales y se rompe con más variables que filas; el RV (Escoufier 1973) resume toda la tabla y es la base del análisis de coinercia; Procrustes (Gower 1975; Peres-Neto y Jackson 2001) compara configuraciones (por ejemplo, dos ordenaciones); Mantel (1967) sirve cuando lo que se tiene son distancias (genéticas, geográficas, ecológicas), aunque su potencia es baja y no corrige la autocorrelación espacial (Guillot y Rousset 2013; Legendre, Fortin y Borcard 2015).The canonical correlation looks for linear combinations and breaks down with more variables than rows; RV (Escoufier 1973) summarizes the whole table and underlies co-inertia analysis; Procrustes (Gower 1975; Peres-Neto and Jackson 2001) compares configurations (two ordinations, for instance); Mantel (1967) serves when what one has are distances (genetic, geographic, ecological), although its power is low and it does not correct for spatial autocorrelation (Guillot and Rousset 2013; Legendre, Fortin and Borcard 2015).
Categóricas, ordinales y mixtasCategorical, ordinal and mixed
Asociación en tablas, correlaciones latentes y el coeficiente adecuado a cada par de tiposAssociation in tables, latent correlations and the right coefficient for each pair of kinds
Primero abre unos datos en el Bloque 2 (o usa un conjunto de ejemplo).First open some data in Block 2 (or use an example dataset).
Dos variables categóricasTwo categorical variables
Qué medida para qué tablaWhich measure for which table
χ² dice si hay asociación; su tamaño lo dan V de Cramér (0 a 1; la corregida de Bergsma 2013 quita el sesgo de las muestras chicas), C de Pearson (nunca llega a 1) o T de Tschuprow. λ, τ y U son asimétricas: cuánto mejora la predicción de una variable al conocer la otra (Goodman y Kruskal 1954; Theil 1970). En 2 × 2, φ es la r de Pearson de dos binarias y la razón de momios no depende de las marginales (Q y Y de Yule la llevan a −1…1). Con categorías ordenadas, γ, d de Somers y τ usan el orden. Si cada variable es un corte de una normal latente, la tetracórica (2 × 2) o la policórica estiman la correlación de esas normales.χ² says whether there is association; its size is given by Cramér’s V (0 to 1; Bergsma’s 2013 correction removes the bias of small samples), Pearson’s C (it never reaches 1) or Tschuprow’s T. λ, τ and U are asymmetric: how much the prediction of one variable improves by knowing the other (Goodman and Kruskal 1954; Theil 1970). In 2 × 2, φ is the Pearson r of two binaries and the odds ratio does not depend on the margins (Yule’s Q and Y bring it to −1…1). With ordered categories, γ, Somers’ d and τ use the order. If each variable is a cut of a latent normal, the tetrachoric (2 × 2) or polychoric correlation estimates the correlation of those normals.
Una continua y una categóricaA continuous and a categorical one
La matriz heterogéneaThe heterogeneous matrix
Cada par con el coeficiente que piden sus tipos: Pearson (continua–continua), poliserial (continua–ordinal o binaria), policórica o tetracórica (ordinales o binarias), η (con una nominal) y V de Cramér corregida (nominal con categórica). La letra de cada celda dice cuál se usó.Each pair with the coefficient its kinds ask for: Pearson (continuous–continuous), polyserial (continuous–ordinal or binary), polychoric or tetrachoric (ordinals or binaries), η (with a nominal one) and bias-corrected Cramér’s V (nominal with categorical). The letter in each cell says which was used.
Acuerdo y fiabilidadAgreement and reliability
Cuando la pregunta no es si dos medidas se mueven juntas, sino si dicen lo mismoWhen the question is not whether two measures move together, but whether they say the same
Primero abre unos datos en el Bloque 2: una columna por evaluador, instrumento o método, y una fila por caso.First open some data in Block 2: one column per rater, instrument or method, and one row per case.
Qué se comparaWhat is compared
Elige dos o más columnas: los evaluadores, instrumentos o métodos que miden lo mismo en los mismos casos.Pick two or more columns: the raters, instruments or methods measuring the same thing on the same cases.
Dos métodos: concordancia y Bland–AltmanTwo methods: concordance and Bland–Altman
Varios evaluadores: coeficientes intraclaseSeveral raters: intraclass correlations
Elige la forma por el diseño: unidireccional si cada caso lo califican evaluadores distintos; bidireccional si los mismos evaluadores califican todo; «consistencia» si basta con que ordenen igual, «acuerdo absoluto» si deben dar el mismo número; una medida o el promedio de los evaluadores (McGraw y Wong 1996; Koo y Li 2016).Choose the form by the design: one-way if each case is rated by different raters; two-way if the same raters rate everything; “consistency” if ordering the same is enough, “absolute agreement” if they must give the same number; a single measure or the average of the raters (McGraw and Wong 1996; Koo and Li 2016).
Categorías: κ y sus parientesCategories: κ and its relatives
Por qué una r alta no es acuerdo, y las paradojas de κWhy a high r is not agreement, and the paradoxes of κ
Dos instrumentos pueden correlacionar a 0.99 y diferir siempre por diez unidades, o uno dar el doble que el otro: r mide asociación, no acuerdo (Bland y Altman 1986). La concordancia de Lin (1989) penaliza los dos desvíos (de ubicación y de escala), y el gráfico de Bland–Altman muestra cuánto pueden diferir en un caso. κ corrige el acuerdo por el azar (Cohen 1960), pero con categorías muy desbalanceadas puede ser bajo aunque el acuerdo sea alto (Feinstein y Cicchetti 1990); AC1 de Gwet (2008) es más estable en ese caso. α de Krippendorff admite cualquier número de evaluadores, faltantes y escalas nominal, ordinal, de intervalo o de razón (Hayes y Krippendorff 2007).Two instruments can correlate at 0.99 and always differ by ten units, or one give twice the other: r measures association, not agreement (Bland and Altman 1986). Lin’s concordance (1989) penalizes both departures (of location and of scale), and the Bland–Altman plot shows how much they can differ on one case. κ corrects agreement for chance (Cohen 1960), but with very unbalanced categories it can be low although agreement is high (Feinstein and Cicchetti 1990); Gwet’s AC1 (2008) is more stable then. Krippendorff’s α admits any number of raters, missing ratings and nominal, ordinal, interval or ratio scales (Hayes and Krippendorff 2007).
Datos con estructura y datos especialesStructured and special data
Cuando las filas no son independientes, o los números no son una rectaWhen the rows are not independent, or the numbers are not a line
Primero abre unos datos en el Bloque 2 (o usa un conjunto de ejemplo).First open some data in Block 2 (or use an example dataset).
Grupos y la paradoja de SimpsonGroups and Simpson’s paradox
Medidas repetidasRepeated measures
Cuando cada sujeto aporta varias filas, la r de siempre mezcla la relación dentro de los sujetos con las diferencias entre ellos y cuenta de más los grados de libertad. La correlación de medidas repetidas (Bakdash y Marusich 2017) usa sólo la variación dentro de cada sujeto, con una pendiente común.When each subject contributes several rows, the usual r mixes the relation within subjects with the differences between them and overcounts the degrees of freedom. The repeated measures correlation (Bakdash and Marusich 2017) uses only the variation within each subject, with a common slope.
Series de tiempo: correlación cruzada y preblanqueoTime series: cross-correlation and prewhitening
Dos series con tendencia o con memoria correlacionan aunque no tengan nada que ver (Yule 1926). El preblanqueo ajusta un modelo autorregresivo a X, filtra con él las dos series y sólo entonces las correlaciona en cada retardo.Two series with a trend or a memory correlate even if they have nothing to do with each other (Yule 1926). Prewhitening fits an autoregressive model to X, filters both series with it and only then correlates them at each lag.
Datos espaciales: la t modificada de DutilleulSpatial data: Dutilleul’s modified t
Si los lugares cercanos se parecen, hay menos información independiente que filas y el valor p habitual es demasiado optimista. La prueba de Dutilleul (1993) estima el tamaño de muestra efectivo con la autocorrelación de cada variable (I de Moran por clases de distancia).If nearby places resemble each other, there is less independent information than rows and the usual p-value is too optimistic. Dutilleul’s test (1993) estimates the effective sample size from the autocorrelation of each variable (Moran’s I by distance classes).
Especies emparentadas: contrastes independientesRelated species: independent contrasts
Las especies comparten historia y no son observaciones independientes (Felsenstein 1985). Con el árbol filogenético, cada nodo da un contraste independiente; su correlación pasa por el origen.Species share history and are not independent observations (Felsenstein 1985). With the phylogenetic tree, each node gives an independent contrast; their correlation goes through the origin.
Datos circularesCircular data
Ángulos, horas, días del año, meses: 359° y 1° están juntos y Pearson no lo sabe. Para dos ángulos, la correlación de Jammalamadaka y SenGupta (1988); para un ángulo y una variable lineal, la de Mardia (1976).Angles, hours, days of the year, months: 359° and 1° are neighbors and Pearson does not know it. For two angles, the correlation of Jammalamadaka and SenGupta (1988); for an angle and a linear variable, Mardia’s (1976).
Composiciones: partes de un todoCompositions: parts of a whole
Si las variables suman una constante (porcentajes, proporciones), su correlación de Pearson es espuria por construcción (Pearson 1897): si una sube, otras tienen que bajar. Se trabaja con log-cocientes centrados (Aitchison 1986) y con la proporcionalidad ρp.If the variables add up to a constant (percentages, proportions), their Pearson correlation is spurious by construction (Pearson 1897): if one rises, others must fall. One works with centered log-ratios (Aitchison 1986) and with the proportionality ρp.
Redes de correlaciónCorrelation networks
Cada variable un nodo, cada relación una arista: quién se conecta con quién, quién está en el centro y qué grupos se formanEach variable a node, each relation an edge: who connects to whom, who is at the center and which groups form
Primero abre unos datos en el Bloque 2 (o usa un conjunto de ejemplo).First open some data in Block 2 (or use an example dataset).
Qué redWhich network
La redThe network
Cómo leer una red de correlaciónHow to read a correlation network
En una red de correlaciones marginales casi todo se conecta con todo; las correlaciones parciales muestran sólo las relaciones que quedan al controlar por todas las demás variables, y el lazo gráfico (Friedman, Hastie y Tibshirani 2008) pone en cero las débiles, eligiendo cuántas con el EBIC (Foygel y Drton 2010; Epskamp y Fried 2018). La fuerza de un nodo es la suma de sus |w|; la cercanía y la intermediación usan caminos de longitud 1/|w| (Opsahl, Agneessens y Skvoretz 2010) y son las menos estables entre muestras. Las comunidades maximizan la modularidad (Newman 2006) con el método de Louvain (Blondel et al. 2008).In a network of marginal correlations almost everything connects to everything; partial correlations show only the relations left after controlling for all the other variables, and the graphical lasso (Friedman, Hastie and Tibshirani 2008) sets the weak ones to zero, choosing how many with the EBIC (Foygel and Drton 2010; Epskamp and Fried 2018). A node’s strength is the sum of its |w|; closeness and betweenness use paths of length 1/|w| (Opsahl, Agneessens and Skvoretz 2010) and are the least stable across samples. The communities maximize modularity (Newman 2006) with the Louvain method (Blondel et al. 2008).
Centralidades y comunidadesCentralities and communities
Comparar, corregir, planear y combinarCompare, correct, plan and combine
Las preguntas que vienen después de calcular una correlación: ¿es distinta de otra?, ¿cuánto vale sin el error de medida?, ¿cuántos casos necesito?, ¿qué dicen todos los estudios juntos?The questions that come after computing a correlation: is it different from another?, what is it worth without measurement error?, how many cases do I need?, what do all the studies say together?
Qué correlacionesWhich correlations
Tomarlas de los datos abiertosTake them from the open data
¿Son distintas?Are they different?
Por qué importa el diseñoWhy the design matters
Con grupos independientes basta la diferencia de las z de Fisher (Fisher 1925). Si las dos correlaciones se calcularon en los mismos casos, están correlacionadas entre sí y la prueba debe usar la correlación entre ellas: con una variable en común (rjk frente a rjh) cuenta rkh; sin variable en común, las cuatro correlaciones cruzadas. Hay una decena de propuestas (Steiger 1980; Meng, Rosenthal y Rubin 1992); en simulaciones las más fieles al nivel nominal son la t de Williams (1959) y la z de Hittner, May y Silver (2003) para el caso traslapado, y la de Silver, Hittner y May (2004) para el no traslapado. El intervalo de Zou (2007) da además el tamaño de la diferencia, no sólo su significancia.With independent groups the difference of Fisher’s z is enough (Fisher 1925). If both correlations were computed on the same cases, they are correlated with each other and the test must use the correlation between them: with one variable in common (rjk against rjh) rkh counts; with none, the four cross correlations. There are a dozen proposals (Steiger 1980; Meng, Rosenthal and Rubin 1992); in simulations the most faithful to the nominal level are Williams’ t (1959) and Hittner, May and Silver’s z (2003) for the overlapping case, and Silver, Hittner and May’s (2004) for the non-overlapping one. Zou’s interval (2007) also gives the size of the difference, not only its significance.
Dos matrices de correlaciónTwo correlation matrices
Se comparan las matrices de dos grupos de casos: abre en el Bloque 2 unos datos con una columna de grupo.The matrices of two groups of cases are compared: open in Block 2 some data with a grouping column.
¿La estructura es la misma?Is the structure the same?
La prueba de Jennrich y las comparaciones celda por celdaJennrich’s test and the cell-by-cell comparisons
La prueba de Jennrich (1970) compara las dos matrices completas con un χ² de p(p − 1)/2 grados de libertad que toma en cuenta que las correlaciones de una misma matriz dependen unas de otras. Sumar los z² de cada celda sólo da un χ² cuando todas las correlaciones son casi cero: con variables correlacionadas rechaza de más (en nuestra simulación, 11 % en vez de 5 %), por eso aquí sirve sólo para leer celda por celda, con la corrección de Holm.Jennrich’s test (1970) compares the two whole matrices with a χ² on p(p − 1)/2 degrees of freedom that takes into account that the correlations of one matrix depend on each other. Summing the z² of each cell gives a χ² only when all correlations are near zero: with correlated variables it rejects too often (in our simulation, 11% instead of 5%), so here it serves only to read cell by cell, with Holm’s correction.
Corregir por atenuaciónCorrect for attenuation
Si las dos medidas tienen error, la correlación observada subestima la de los valores verdaderos: r / √(rxx · ryy) (Spearman 1904), con rxx y ryy las fiabilidades (α, test–retest o un ICC del Bloque 9).If both measures carry error, the observed correlation underestimates that of the true scores: r / √(rxx · ryy) (Spearman 1904), with rxx and ryy the reliabilities (α, test–retest or an ICC from Block 9).
Corregir por rango restringidoCorrect for range restriction
Si sólo se observaron casos con valores de x dentro de un intervalo (los admitidos, los sobrevivientes, los seleccionados), la correlación sale más baja que en la población completa. El caso II corrige la selección directa sobre x; el caso III, la selección sobre una tercera variable z (Thorndike 1949). U es el cociente de la desviación estándar sin restricción entre la restringida.If only cases with x inside an interval were observed (the admitted, the survivors, the selected), the correlation comes out lower than in the whole population. Case II corrects direct selection on x; case III, selection on a third variable z (Thorndike 1949). U is the unrestricted standard deviation divided by the restricted one.
PrecaucionesCautions
Las dos correcciones suponen relación lineal y homocedástica y que la selección fue la que se dice; una corrección mayor que 1 indica que alguna fiabilidad está subestimada o que el error no es independiente. Corregir no crea información: el intervalo corregido es el intervalo observado transformado con la misma fórmula, más ancho en la misma proporción (Hunter y Schmidt 2004; Sackett y Yang 2000).Both corrections assume a linear, homoscedastic relation and that the selection was the one stated; a correction above 1 means that some reliability is underestimated or that the error is not independent. Correcting creates no information: the corrected interval is the observed one transformed by the same formula, wider in the same proportion (Hunter and Schmidt 2004; Sackett and Yang 2000).
Planear un estudioPlan a study
Exacta y aproximadaExact and approximate
La potencia exacta integra la densidad de r cuando la verdadera es ρ (Fisher 1915; Hotelling 1953) sobre la región donde la prueba t rechaza; la aproximada usa la z de Fisher con la corrección de sesgo ρ/(2(n − 1)) y se aparta unas milésimas con n pequeño. Con ρ = 0 la potencia exacta es α, como debe ser. Planear por la amplitud del intervalo, y no sólo por la potencia, garantiza una estimación útil aunque el efecto resulte pequeño (Bonett y Wright 2000).The exact power integrates the density of r when the true value is ρ (Fisher 1915; Hotelling 1953) over the region where the t test rejects; the approximate one uses Fisher’s z with the bias correction ρ/(2(n − 1)) and departs by a few thousandths with small n. With ρ = 0 the exact power is α, as it should. Planning by the width of the interval, and not only by power, guarantees a useful estimate even if the effect turns out small (Bonett and Wright 2000).
Factor de Bayes de una r publicadaBayes factor of a published r
Con sólo r y n: la evidencia a favor de ρ ≠ 0 frente a ρ = 0, con la previa beta extendida de ancho κ (Ly, Verhagen y Wagenmakers 2016).With only r and n: the evidence for ρ ≠ 0 against ρ = 0, with the stretched beta prior of width κ (Ly, Verhagen and Wagenmakers 2016).
Los estudiosThe studies
Un estudio por renglón: nombre; r; n (separados por punto y coma o tabulador). Se combinan en la escala z de Fisher con varianza 1/(n − 3).One study per line: name; r; n (separated by semicolon or tab). They are combined on Fisher’s z scale with variance 1/(n − 3).
Lo que dicen juntosWhat they say together
Efecto fijo, efectos aleatorios y heterogeneidadFixed effect, random effects and heterogeneity
El efecto fijo supone que todos los estudios estiman la misma ρ; los efectos aleatorios, que cada uno estima la suya, alrededor de un promedio, con varianza τ² (DerSimonian y Laird 1986; REML de Viechtbauer 2005). Q prueba si hay heterogeneidad; I² dice qué parte de la variación entre estudios no es azar (Higgins y Thompson 2002); el intervalo de predicción dice dónde caería la ρ de un estudio nuevo (Higgins, Thompson y Spiegelhalter 2009) y suele ser mucho más ancho que el de confianza. La prueba de Egger et al. (1997) busca asimetría en el embudo, que puede venir del sesgo de publicación o de que los estudios pequeños son distintos. El método de Hunter y Schmidt (2004) trabaja sobre r y dice qué porcentaje de la varianza observada explica el error de muestreo.The fixed effect assumes that all studies estimate the same ρ; random effects, that each estimates its own, around an average, with variance τ² (DerSimonian and Laird 1986; REML in Viechtbauer 2005). Q tests whether there is heterogeneity; I² says which part of the variation between studies is not chance (Higgins and Thompson 2002); the prediction interval says where the ρ of a new study would fall (Higgins, Thompson and Spiegelhalter 2009) and is usually much wider than the confidence interval. Egger et al.’s test (1997) looks for asymmetry in the funnel, which may come from publication bias or from small studies being different. Hunter and Schmidt’s method (2004) works on r and says which percentage of the observed variance sampling error explains.
Figuras, paletas e informeFigures, palettes and report
Lo que se lleva al artículo: las figuras a tamaño de revista, una paleta propia que se lea con cualquier visión, la tabla, los métodos redactados con lo que corriste y sus referenciasWhat goes into the paper: the figures at journal size, a palette of your own that reads with any vision, the table, the methods written from what you ran and their references
Las figuras que has hechoThe figures you have made
Cada figura que dibujaron los bloques. «Exportar» la abre en el estudio de figuras: anchos de revista (85, 114 y 180 mm), resolución, PNG, SVG, PDF vectorial y TIFF, con el aviso si alguna letra queda por debajo de los 7 pt. Marca las que quieras en el informe.Every figure the blocks drew. “Export” opens it in the figure studio: journal widths (85, 114 and 180 mm), resolution, PNG, SVG, vector PDF and TIFF, with a warning if any text falls below 7 pt. Tick the ones you want in the report.
Diseñar una paleta divergenteDesign a diverging palette
Dos tonos, uno para las correlaciones positivas y otro para las negativas, que se encuentran en un centro claro. Se construye en OKLab, un espacio donde distancias iguales se ven iguales, así que el color crece al mismo paso que |r|. Las pruebas de la derecha dicen si la paleta cabe en la pantalla, si es uniforme, si el signo se distingue con las tres formas comunes de daltonismo y si funciona impresa en gris.Two hues, one for positive correlations and one for negative ones, meeting at a light center. It is built in OKLab, a space where equal distances look equal, so the color grows at the same pace as |r|. The checks on the right say whether the palette fits the screen, whether it is uniform, whether the sign can be told apart with the three common forms of color blindness and whether it works printed in gray.
Tabla de correlaciones para publicarCorrelation table to publish
Abre unos datos en el Bloque 2 (o calcula una matriz en el Bloque 5) para armar la tabla.Open some data in Block 2 (or compute a matrix in Block 5) to build the table.
El estilo de los números (cero inicial, coma o punto decimal, «p < .001») vale para toda la app: es el mismo de «Estilos de reporte» en el Inicio.The style of the numbers (leading zero, decimal comma or point, “p < .001”) applies to the whole app: it is the same as “Reporting styles” on Home.
Métodos, redactados con lo que corristeMethods, written from what you ran
Un párrafo por bloque que usaste en esta sesión, con los coeficientes, las pruebas, las correcciones y los ajustes que elegiste, y la cita de cada método. Revísalo: la app escribe lo que hizo, pero el porqué lo pones tú.A paragraph for each block you used in this session, with the coefficients, tests, corrections and settings you chose, and the citation of each method. Check it: the app writes what it did, but the why is yours.
Referencias de los métodos usadosReferences of the methods used
El informeThe report
Un documento con los datos usados, los resultados de cada bloque, la tabla, las figuras que marcaste, los métodos y las referencias, con los colores del tema claro. Se abre en una pestaña lista para imprimir o guardar como PDF, o se descarga como HTML.A document with the data used, the results of each block, the table, the figures you ticked, the methods and the references, in the colors of the light theme. It opens in a tab ready to print or save as PDF, or downloads as HTML.
El paquete del proyectoThe project package
Un archivo .json con los datos tal como los leíste, el tipo y el papel de cada columna, el manejo de faltantes, la paleta (también la tuya) y el estilo de reporte. Al abrirlo, los bloques se recalculan con esos datos: nada sale de tu equipo.A .json file with the data as you read them, the kind and role of each column, the handling of missing values, the palette (yours too) and the reporting style. When it is opened, the blocks recompute on those data: nothing leaves your computer.