Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cholesky]

The tag has no usage guidance.

2
votes
0answers
27 views

Eigenvalue decomposition of a covariance matrix using a fast Cholesky decomposition

Let $\mathbf{C}$ be a $n \times n$ covariance matrix and assume that the LDL' Cholesky decomposition can be obtained efficiently. Can we take advantage of this to obtain a fast eigenvalue ...
0
votes
0answers
13 views

Cholesky decomposition in control variates method (Monte Carlo variance reduction technique)

The control variates method, used as a variance reduction technique for Monte Carlo simulations, takes one new variable $t$, correlated to the random variable $m$ to estimate (using the same notations ...
0
votes
2answers
160 views

Estimating correlation matrix using numeric likelihood maximization

I'm performing maximum likelihood estimation on jointly distributed data and I'm having some issues estimating the correlation terms. I am using an approach based on the Cholesky decomposition, but I ...
0
votes
1answer
21 views

Conserve correlation with simulate data

let me explain you the process, I have random variables in a matrix $X_1$: $260\times3$. I have my correlation matrix $\rho_1$: $3\times3$ from my matrix $X_1$. Now I use a Cholesky decomposition ...
3
votes
1answer
302 views

Why is computing ridge regression with a Cholesky decomposition much quicker than using SVD?

By my understanding, for a matrix with n samples and p features: Ridge regression using Cholesky decomposition takes O(p^3) time Ridge regression using SVD takes O(p^3) time Computing SVD when only ...
2
votes
0answers
31 views

Cholesky Decomposition (in lmer from lme4)

When I retrace the implementation of lmer from lme4 I faced a question regarding cholesky decomposition used for solving penalized least squares. Consider a Cholesky decomposition of a matrix M with ...
6
votes
1answer
4k views

Confused about Cholesky and eigen decomposition

I'm looking to generate correlated random variables. I have a symmetric, positive definite matrix. So I know that you can use the Cholesky decomposition, however I keep being told that this only works ...
0
votes
0answers
66 views

Generalized linear regression with custom variance-covariance matrix in R

I want to compute the estimate of $\beta$ for a linear model $Y = X\beta + \varepsilon $ with $$\varepsilon \sim N_d(0, \sigma^2V),$$ where $V$ is a $d\times d$ definitive posive, symmetric matrix. ...
7
votes
1answer
1k views

Difference between Cholesky decomposition and log-cholesky Decomposition

Is there any difference between a Cholesky decomposition and a log-cholesky decomposition? If yes, what is the difference? In the paper "An R package for dynamic linear models" by Giovanni Petris ( ...
0
votes
0answers
760 views

Cholesky decomposition of the covariance matrix: not positive definite?

I am implementing a multivariate simulation in R and when applying the Cholesky decomposition to the covariance matrix I get: the leading minor of order one is not positive definite How could the ...
1
vote
0answers
41 views

A transformation from uniform random variable to Gaussian mixture

I am attempting to describe a prior_transform for a multivariate Gaussian mixture in order to estimate the evidence integral of that prior convolved with another likelihood distribution. This is ...
1
vote
0answers
231 views

Can someone provide a non-technical explanation of how Cholesky Covariance priors work?

I am looking for an explanation of how Cholesky Covariance priors work in the context of mixed effects regression. In particular, when they are applied to the correlations among random effects. What ...
1
vote
1answer
1k views

How to calculate the standard deviation for a Gaussian Process?

I am quite new to Gaussian processes. A Gaussian Process looks like the following: Where the dark blue line denotes the mean, and the filled-area denotes the mean+std and mean-std respectively. ...
5
votes
1answer
570 views

For symmetric matrices, is the Cholesky decomposition better than the SVD? [closed]

I am inverting a sparse, symmetric, ill-conditioned matrix. I have used both SVD and the LDL decomposition. I find that my results are better with the latter. Why? I understand that LDL ...
1
vote
1answer
306 views

Relation of kernels and Cholesky decomposition

I am trying to find an intuition on why we require that kernels are positive semi definite and I have found this: We are given a dataset $X$ of size $n \times d$ where $n$ is the number of samples ...
0
votes
1answer
534 views

Are VAR and VEC models theoretically neutral?

I have recently been introduced to Vector Autoregression (VAR) and Vector Error Correction (VEC) models in an Econometrics class, where both approaches were presented as a neutral way to test economic ...
0
votes
1answer
529 views

Cholesky Shock - Interpretation of logs in IRF Models

I came across a few articles here and there that conclude: When the data (say variables X, Y) for an impulse response function are on log level, the y-axis depicts the % response of Y to a 1% shock ...
4
votes
1answer
299 views

Compute covariance matrix via rank-1 update to $M^\top M$

I have a large, sparse matrix $M\in\mathbb{R}^{n\times p}$. Centering $M$ to compute the covariance matrix $\Sigma$ would, in general, destroy the "zeros aren't stored" property of sparse matrices. ...
2
votes
0answers
343 views

IRF function with several exogenous covarites (SVAR model)

How to interpret an IRF function with exogenous covariates. Example: Small open economy which I control for foreign variables (Endogenous variables cannot influence the exogenous variables). The ...
0
votes
0answers
115 views

DCC GARCH and cholesky factorization

I want to run a simulation experiment after I have estimated my DCC GARCH parameters (following Becker et al. methodology) Basically, since I am rather unfamiliar with the application of cholesky ...
1
vote
0answers
81 views

Simulating data with local correlations

Im writing my thesis, which a monte-carlo study aimed at generating datasets for comparing the performance of various regression models (Neural networks amongst others). And since neural networks can ...
16
votes
3answers
6k views

Cholesky versus eigendecomposition for drawing samples from a multivariate normal distribution

I would like to draw a sample $\mathbf{x} \sim N\left(\mathbf{0}, \mathbf{\Sigma} \right)$. Wikipedia suggests either using a Cholesky or Eigendecomposition, i.e. $ \mathbf{\Sigma} = \mathbf{D}_1\...
3
votes
0answers
338 views

Constructing a positive definite covariance matrix

I am trying to construct a covariance matrix between a set of demands $t \in T$. The only information I have of the demands are the mean and the standard deviation. I intend to apply Cholesky ...
3
votes
1answer
813 views

How to do SVD instead of Cholesky for $L^{T}L$?

The Cholesky decomposition can be used to obtain $A$ from $X = AA^{T}$ (lower triangular version) but also $B$ from $Y = B^{T}B$ (upper triangular version). The SVD can be used to do something similar ...
14
votes
5answers
2k views

Generate normally distributed random numbers with non positive-definite covariance matrix

I estimated the sample covariance matrix $C$ of a sample and get a symmetric matrix. With $C$, I would like to create $n$-variate normal distributed r.n. but therefore I need the Cholesky ...
1
vote
1answer
344 views

Simulate Moderated Regression with Cholesky Decomposition

I want to simulate a moderated regression where the slopes are standardized (i.e., can be interpreted like correlations), and I am wondering how to do this with Cholesky decomposition. My initial ...
2
votes
1answer
224 views

Residual sum of squares of block matrix with sparse elements

Based on the question Residual Sum of squares in Weighted regression, a fast way to solve for $$(\mathbf{y-X\hat{\boldsymbol\beta}})^{'}\mathbf{C}^{-1}(\mathbf{y-X\hat{\boldsymbol\beta}})$$ is to ...
15
votes
5answers
23k views

How to use the Cholesky decomposition, or an alternative, for correlated data simulation

I use Cholesky decomposition to simulate correlated random variables given a correlation matrix. The thing is, the result never reproduces the correlation structure as it is given. Here is a small ...
4
votes
2answers
2k views

Why use upper triangular Cholesky?

Software packages seem to prefer to work with the upper triangular part of the Cholesky factorization, see for example cholupdate. Why is this? It seems that it is ...
13
votes
1answer
308 views

Explain how `eigen` helps inverting a matrix

My question relates to a computation technique exploited in geoR:::.negloglik.GRF or geoR:::solve.geoR. In a linear mixed model ...
1
vote
1answer
643 views

R: difference between Generalized Least Square and the Standard Least Squares with Cholesky

According to Wikipedia (source of all truth and knowledge...), http://en.wikipedia.org/wiki/Generalized_least_squares#Properties a weighted least square regression is equivalent to a standard least ...
3
votes
0answers
87 views

Mahalanobis distance for highly multivariate random variable

I have to compute the Mahalanobis distance for a $10^6$ dimensional multivariate random variable. What is the best (and fastest) way to do this? I am currently taking cholesky decomposition of the ...
1
vote
1answer
298 views

Choleski decomposition of the covariance matrix

I have a process described as $r_t = \mu + \Sigma_t^{1/2}z_t$ where $z_t$ is let's say a standard normal distribution residual and $\Sigma_t$ is the conditional covariance matrix. The $t$ stands ...
1
vote
0answers
71 views

numpy.linalg.cholesky of correlation matrix with small eigenvalue gives error [duplicate]

When doing a Cholesky decomposition of a covariance matrix with very low eigenvalues, numpy.linalg.cholesky and ...
6
votes
2answers
5k views

Can I use the Cholesky-method for generating correlated random variables with given mean?

I want to generate correlated random variables with a given correlation matrix, means, and variances. Does the Cholesky decomposition only work when the initial random variables are iids with the same ...
4
votes
1answer
593 views

Mahalanobis distance with LDL decomposition

I've got an extended Kalman filter with innovation covariance defined as $\mathbf{W}=\mathbf{H}\mathbf{P}\mathbf{H}^\textrm{T} + \mathbf{R}$. I want to know the squared Mahalanobis distance $\|z\|^2$ ...
5
votes
2answers
860 views

Why can't I simulate variables with negative correlation? How can I fix it?

I would like to simulate data with different correlation matrices, with this method: ...
0
votes
0answers
27 views

Create iid normal random vectors

Le us create N independent and identitcally distributed (iid) normal random vectors with zero mean and specific covariance matrix. Each vector is of size p. Let $\Sigma$ be the specific covariance ...
1
vote
0answers
72 views

Sequential conditional simulation to avoid using a large covariance matrix

I would like to generate $S$ samples of a $T \cdot M$ dimensional vector, where $T$ is the number of time steps and $M$ the number of locations, i.e., the vector is a stack with $T$ values for ...
0
votes
1answer
518 views

How to find unknown correlation coefficients in a correlation matrix from known correlation coefficients? [duplicate]

I have a correlation matrix A given below. Here A should be a positive-definite matrix so that we can perform Cholesky decomposition of A. ...
4
votes
1answer
809 views

Cholesky factorization and forward substitution less accurate than inversion?

I recently asked this question asking for an efficient way to compute the Mahalanobis distance (without calculating the inverse). The accepted solution was to use the Cholesky factorization and ...
4
votes
1answer
483 views

Derivative of $x^T A^Ty$ with respect to $\Sigma$ where $A$ is (an upper triangle matrix and ) Cholesky decomposition of $\Sigma$

I would like to evaluate: $$ \frac{ \partial x^T A^Ty}{\partial \Sigma} $$ where $A$ is a Cholesky decomposition of $\Sigma$ and an upper triangle matrix such that $\Sigma = A^T A$, $x$ and $y$ are a ...
0
votes
0answers
53 views

Evaluate the multivariate normal using variance matrices $\boldsymbol{\Lambda}+\alpha_{i}\mathbf{a}\mathbf{a}^{T}+\beta_{j}\mathbf{b}\mathbf{b}^{T}$

I need to calculate a huge amount of inverses and determinants to evaluate the pdf of the multivariate Gaussian. Specifically I need to compute the inverses and determinants of the following ...
2
votes
0answers
123 views

Uncorrelating correlated $\chi^2$ distribution

This question is related to my previous question in here So I was trying to simulate correlated $\chi^2(1)$ random variables given the desired co-variance matrix. However, it seems like the only ...
2
votes
1answer
1k views

Gaussian Process: Using partitions of a Cholesky decomposition solution for conditional deduction

If I define a GP over observed values, $y$, of a sensor reading over time, $t$, as (for simplicity assuming discrete time series e.g lets say readings after every 5 mins) : $y=f(t)+\epsilon$ where $...
3
votes
0answers
179 views

effects of Box-Cox transformation on covariance

I'm trying to synthesize data for a Monte Carlo simulation. I have a stationary random process $x$ and can readily estimate its covariance matrix $S$. I know that if the increments of the process are ...
5
votes
1answer
332 views

Generate random variables with predefined correlation structure AND fixing some values

I need to generate 4 random variables that show a predefined correlation structure Sigma AND where certain values of Vars 1-4 are fixed. As an illustrative example, consider the variables: ...
3
votes
2answers
246 views

Direct parametrization of Cholesky decomposition of spatial covariance matrix

In spatial data analysis, a simple way to model the covariance stucture between spatial observations is via a covariance function like $cov(y_i,y_j) = C e^{-rD_{ij}}$, based on some (euclidean) ...
1
vote
0answers
161 views

Decomposition of a random vector into uncorrelated components

I have a set of random vectors $Y_i$ and their correlation matrix $C_{i,j}$. Each vector can be thought of as a sum of two uncorrelated vectors $Y_i=A_iX+B_iY$, where $X,Y$ are the same vectors for ...