Skip to main content

Questions tagged [correlation-matrix]

A $k\times k$ matrix of correlations between all pairs of $k$ random variables. All its diagonal elements are equal to one.

Filter by
Sorted by
Tagged with
3 votes
2 answers
165 views

Test for multicollinearity with binary and continuous independent variables

I have a question concerning multicollinearity: I have several independent variables. Some are binary and some continuous. The dependent variable is binary. Can I use the Pearson correlations to test ...
Lou's user avatar
  • 31
2 votes
1 answer
69 views

Can you specify correlated coefficients in Stan models?

Closest question I could find to mine was this one, which doesn't cover it. Is it possible to specify a correlation between two parameters in a Stan model? Consider a linear regression specified by: $$...
Corned Beef Hash Map's user avatar
1 vote
1 answer
82 views

How to analyze uncorrelated data?

Sometimes we encounter data that is uncorrelated. Specifically, from the correlation matrix we observe that the target variable shows low or no correlation with any of the features. To provide context,...
Avijit Jaiswal's user avatar
1 vote
1 answer
18 views

Efficient construction of correlation matrix—serial correlation

Given $\rho$, is there a way to efficiently construct this matrix (i.e., as a product of matrices, rather than using a for loop)? $$ \Sigma = \begin{pmatrix} 1 & \rho & \rho^2 &\cdots &...
veloskaraptor's user avatar
0 votes
0 answers
26 views

Sample covariance of t distribution and degree of freedom

If $X$ is a P by N size matrix, $X_{ij} \sim N(0,\sigma_i^2)$ if I standardize this X matrix with sample mean and sample variance (assuming I don't have access to the population mean and variance) I ...
maddy's user avatar
  • 21
0 votes
1 answer
77 views

Sample correlation matrix: $\hat{\mathbf{R}} = - \sum_{i=1}^{N}\sum_{j=1}^{N} \mathbf{x}_i \mathbf{x}_j^\top$?

Suppose we have the set $\{\mathbf{x}_i\}_{i=1}^{N}$, where $N$ is the size of the data set and $\mathbf{x}_i \in \mathbb{R}^m$ is the $i$th $m$-sized regressor. The question is simple: how to compute ...
Rubem Pacelli's user avatar
4 votes
3 answers
273 views

Looking at how covariance/correlation between variables differs in two groups?

I have a few hundred variables representing different biomarkers. These variables have been measured in both cases and controls. The underlying units of measurement are not important, so I have ...
bluemouse's user avatar
  • 322
1 vote
0 answers
128 views

How can I compare one full PCA model to two smaller ones?

I have nearly 30 variables going in to a large PCA, but the variables really fall into two conceptual categories. I want to test whether leaving all the variables to correlate freely with one another ...
Scott Benson's user avatar
2 votes
1 answer
152 views

Generate two random correlation matrices which share equal correlations

My setting is, I want to simulate a data set in two conditions, e.g. control and disease. I want them to share mostly the same correlations except some should be different to simulate a "signal&...
Sinraw's user avatar
  • 21
0 votes
0 answers
27 views

How to pick a subset of the rows of a matrix data sample so that the resulting correlation matrix of the curated data approaches the identity matrix?

If I have a data sample in the form of a matrix $X$ of dimensions $n \times m$, is there a standard procedure to optimally pick $n'$ rows ($n'$ fixed) of the matrix $X$ so that $C_{X'}$, the ...
DeadKarlMarx's user avatar
1 vote
1 answer
174 views

What is the null and alternative hypothesis of a chi square test whether a single matrix is an identity matrix?

Say I had a correlation matrix: $$ M = \begin{bmatrix} 0.8 & 0.1 & 0.1\\ 0.3 & 0.7 & 0.1 \\ -0.1 & -0.2 & 0.9 \end{bmatrix} $$ I want to show that it is approximately an ...
RECURSIVE FARTS's user avatar
6 votes
1 answer
709 views

Independent copula vs Student-$t$ copula with zero correlation matrix?

Suppose I have the random variables $X_1, \dots, X_n$ with the marginal distributions are not normal (in fact, unknown marginal distribution). Will there be any difference between the assumption $X_1, ...
InTheSearchForKnowledge's user avatar
1 vote
1 answer
192 views

When to use Simple Linear Regression over Multiple Linear Regression

I am fairly new to the world of statistics and approaching it as I learn more about machine learning. I have a fairly firm grasp on regression analysis so far but not necessarily on nuances and best ...
alphazwest's user avatar
5 votes
0 answers
160 views

Difference between a multivariate normal regression and multiple regressions with shared random effect

Let's $Y_1$, $Y_2$ be two random variables representing two outcomes and $X$ a covariate. I want two regress $Y=(Y_1,Y_2)$ on X, but by taking into account the potential correlation between $Y_1$ and $...
Anthony's user avatar
  • 441
1 vote
1 answer
72 views

Correlation bounds in terms of spectral radius

My application requires that the following is true for random variables $X$, $Y$ in $\mathbb{R}^d$ with $E[X]=0, E[Y]=0$ and spectral radius $\rho$ $$\rho(E[XX]^{-1}E[XY]E[YY]^{-1}E[YX])<0.5$$ Can ...
Yaroslav Bulatov's user avatar
-1 votes
1 answer
57 views

What came first, the covariance or the correlation matrix?

Covariance can be calculated from correlation and correlation can be calculated from covariance. Is it sufficient to refer to them as only transformations of one another? Is one considered more of a ...
develarist's user avatar
  • 4,025
0 votes
1 answer
633 views

How can one derive the original data from the correlation- or covariance matrix of that data?

How can one derive the original data from the correlation- or covariance matrix of that data? I know the way a new, reduced dataset can be calculated from the correlationmatrix and it’s eigenvectors ...
SciTech Talk's user avatar
3 votes
1 answer
5k views

Clustering data based on correlation

I have a dataset where each row represents a sample and each sample is described by its chemical composition. You can see the 10 first rows of the dataset in figure 1. Figure 1 - Each row represent a ...
bjornsing's user avatar
  • 209
4 votes
1 answer
250 views

Bounds for common correlation of uncorrelated random variables with another random variable

Suppose we have a random variable $y$ and a collection $(x_1,\dots,x_n)$ of $n$ random variables that are all uncorrelated: $\operatorname{corr}(x_i,x_j) = 0$ $\forall i \ne j$ and that all have the ...
Chris_77's user avatar
  • 225
0 votes
1 answer
33 views

Correlation matrix: decline in correlation

I performed a correlation matrix with Python. The following variables were included total_equity,net_income,...
Julian's user avatar
  • 11
1 vote
0 answers
93 views

Calculate unbiased standard errors for a regression from latent factor correlations

I have a SEM where various latent variables are correlated with each other. I want to use a subset of these correlations to run a regression. This can be done easily enough to find point estimates, ...
Tim Bainbridge's user avatar
0 votes
1 answer
953 views

How to determine mse of estimate from correlation matrix of estimate error?

I have a model of an information transmission system Y = XH + N, where X is a diagonal matrix with the transmitted "symbols" (known), H is a column vector which distorts the transmitted symbols and N ...
Analon92's user avatar
2 votes
1 answer
4k views

Eigenvectors for correlation and covariance matrix PCA

I know the generally reasons of using correlation matrix vs a covariance matrix when doing PCA (and visa versa) however when thinking about the eigenvectors (principal components of the data) of each ...
hhprogram's user avatar
  • 139
1 vote
0 answers
224 views

Change in eigenvalues due to perturbation to a correlation matrix

Let $A$ be a $m \times n$ matrix defined as $ A = \Big[\frac{a_1}{\|a_1\|} \cdots \frac{a_n}{\|a_n\|}\Big]$ and $a_k \in \mathbb{R}^{m\times 1}$ where $k \in [1,\dots,n]$. Now, we define a ...
hari's user avatar
  • 11
1 vote
1 answer
287 views

How to simulate random correlation matrix containing off diagonal structures

I want to simulate a correlation matrix which has some off-diagonal structures and also should have some hierarchical structures. For simulating correlation matrices which contain hierarchical ...
newbie's user avatar
  • 225
0 votes
0 answers
117 views

Simulate correlation matrix using a given structure [duplicate]

I want to generate correlation matrix such that it follows the below structure $$\Sigma = B \Lambda B^T $$ where $\Lambda$ is a diagonal matrix containing positive elements, $\Sigma \in R^{n \times n}...
newbie's user avatar
  • 225
5 votes
0 answers
557 views

How do I simulate a random valid correlation matrix of ordinal variables given a list of marginal probabilities?

I am trying to use R to simulate random variations in a real dataset with a known number of categorical and continuous predictor variables, as well as known marginal probabilities for each ordinal/...
Drew's user avatar
  • 51
16 votes
4 answers
5k views

Is it possible that 3 vectors have all negative pairwise correlations?

Given three vectors $a$, $b$, and $c$, is it possible that correlations between $a$ and $b$, $a$ and $c$, and $b$ and $c$ are all negative? I.e. is this possible? \begin{align} \text{corr}(a,b) < ...
Antti A's user avatar
  • 261
3 votes
0 answers
3k views

What is the best way to Show a Correlation Matrix as a Cluster/Network Graph in Python? [closed]

I'm struggling because while I want to show the interrelationship of correlation between my fields, I realize that trying to plot nodes in terms of distance away from each other based on correlation ...
David Yang's user avatar
2 votes
0 answers
411 views

Method to generate random correlation matrices with specified structure.

Within the social sciences there is a popular technique called Factor Analysis and I am interested in generating random correlation matrices that uniformly sample all the space parameterized by one ...
S. Punky's user avatar
  • 773
1 vote
1 answer
1k views

Help needed with intuition of eigenvalue spectrum of correlation matrix

I wish to get a better understanding of the meaning of the eigenvalues of a correlation matrix I am studying. I have a correlation matrix of noise levels for 10 cells in a wireless network over time....
TheGoat's user avatar
  • 639
1 vote
0 answers
56 views

How to generate a set of random variables with specific correlations and correlational distributions

I apologize if this question is a bit confusing. Suppose we get to generate an $n \times n$ matrix, $M$, whose values are all between 0 and 1. How can we generate a set of $n$ random variables, $\{...
user1956177's user avatar
13 votes
1 answer
10k views

Do the Determinants of Covariance and Correlation Matrices and/or Their Inverses Have Useful Interpretations?

While learning to calculate covariance and correlation matrices and their inverses in VB and T-SQL a few years ago, I learned that the various entries have interesting properties that can make them ...
SQLServerSteve's user avatar
1 vote
2 answers
638 views

Cluster analysis using the posterior distribution of a Bayesian correlation matrix

Background and Problem I recently ran a Bayesian multivariate epidemiological meta-analysis on prevalence estimates for several disorders. This analysis included a probit-based model to deal with the ...
jmfawcet's user avatar
  • 432
5 votes
2 answers
10k views

Does using a covariance matrix of scaled and centered variables compare with using a correlation matrix?

I have some data with features which have different units of measurements. Here, by data, I'm trying to say that the row represents the observations and column the features. There are correlations ...
Abhishek Subramanian's user avatar
2 votes
1 answer
123 views

Correlation matrix for biostatistics [closed]

I want to convert the expression of the genes from an array to a gene correlation matrix, to know the correlation of each gene with the other genes. I have 6 samples, 3 controls and 3 test, is it ...
Mee's user avatar
  • 31
2 votes
0 answers
381 views

correlation matrix test: is this code correct or is it missing a multiple comparisons correction?

I have $m$ variables $x_1,\dots,x_m$, measured in $N$ independent tests $\{x_{i1},\dots,x_{im}\}_{i=1}^N$, leading to the design matrix $X$. I noted that the demo function ...
DeltaIV's user avatar
  • 18.3k
2 votes
0 answers
148 views

Check whether a sample correlation matrix is valid [duplicate]

Is it possible to have the following sample correlation matrix for $x$, $y$, $z$? $\begin{pmatrix} 1 & 0.8 & 0.2 \\ 0.8 & 1 & 0.7\\ 0.2 & 0.7 & 1\end{pmatrix}$ Where a 3 by 3 ...
user59036's user avatar
  • 205
3 votes
1 answer
1k views

Reporting Fisher-transformed Pearson's correlations when the magnitude of difference is relevant

My field regularly demonstrates a certain type of result with pairwise Pearson's correlation matrices between predicted and measured data. As soon as such correlations become high, Fisher-transforming ...
kapibarasama's user avatar
13 votes
3 answers
5k views

Is there a serious problem with dropping observations with missing values when computing correlation matrix?

I have this huge data set with like 2500 variables and like 142 observations. I want to run a correlation between Variable X and the rest of the variables. But for many columns, there are entries ...
Stan Shunpike's user avatar
2 votes
0 answers
686 views

How to compare diagonal elements of precision matrix (the inverted correlation matrix)?

Let $$C=\begin{pmatrix}C_{11} & C_{12}\\ C_{21} & C_{22}\end{pmatrix}$$ be a $p\times p$ correlation matrix with positive entries, where $C_{11}$ is a $q\times q$ matrix. Define $D=C^{-1}=(d_{...
Sophia's user avatar
  • 21
6 votes
1 answer
172 views

How to randomly generate a positive semidefinite matrix subject to Loewner constraint?

For real, symmetric, positive semidefinite matrices $A$ and $B$, let $\leq_L$ denote the Loewner partial order: $A \leq_L B$ iff $B-A$ is positive semidefinite. Suppose $A$ and $B$ are fixed PSD ...
Ronaldo Carpio's user avatar
21 votes
6 answers
8k views

Completing a $3 \times 3$ correlation matrix — $2$ coefficients of the $3$ given

I was asked the following question in an interview. Let's say we have a correlation matrix of the form \begin{bmatrix}1&0.6&0.8\\0.6&1&\gamma\\0.8&\gamma&1\end{bmatrix} Find ...
novice's user avatar
  • 353
5 votes
2 answers
2k views

With an R function that expects a covariance matrix, can I give it a correlation matrix?

The R function mvrnorm from the MASS package generates random numbers from a multivariate normal distribution. It expects a ...
rsoren's user avatar
  • 145
2 votes
1 answer
297 views

Is there a way to reconstitute the unit of measurement in PCA?

I have a data set composed of changes in financial asset prices. Because they are on different levels, e.g., one asset is trading in the 100s, the other in the 5s, the change their prices have vastly ...
A1122's user avatar
  • 227
4 votes
1 answer
1k views

Exact meaning of correlation coefficient

What is the exact meaning of the entries of a correlation coefficients matrix? I have spent time researching this, but could find only approximate interpretations which give me no good understanding ...
raggot's user avatar
  • 143
3 votes
1 answer
2k views

How the Correlation Matrix is built for PCA in Weka?

Just to give a context, I want to use PCA (Principal Component Analysis) to identify which attributes are similar to others, so I can use just one (or a subset) of them. The correlation matrix of n ...
Bigo's user avatar
  • 41
2 votes
1 answer
1k views

Covariance Matrix and Correlation Matrix - Singularity

If a covariance matrix is non-singular, does this implies that correlation matrix is also non-singular. My guess is it depends on mean vector in $K_{X} = R_{X} - m_X.{m_X}^H$ Not sure though.
urvah shabbir's user avatar
1 vote
0 answers
226 views

Correlation Matrix from given R output of Factor Analysis

I carried out a factor analysis of 5 variables using a single factor. How do I estimate the correlation matrix assuming the one factor model holds? The R output is:
A.Chandy's user avatar
4 votes
1 answer
2k views

Does it make sense to use PCA when the determinant of the correlation matrix is (almost) zero?

I'm running a PCA over a data set of $N \times p$ size ($N\approx 1000$ being the number of measurements and $p\approx 200$ being the number of dimensions/predictors). I expect many of the predictors ...
Marco Mene's user avatar