Questions tagged [cholesky]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
43 views

How to show that $X = LY$ where $Y\sim N(0,I)$?

Let $X\sim MVN(0,\Sigma)$ denote a random vector having the multivariate normal distribution with mean $0$ and covariance matrix $\Sigma$. Suppose we want to sample from $X\sim MVN(0,\Sigma)$. ...
2
votes
0answers
27 views

Geometric interpretation of Cholesky Decomposition

I understand that a square matrix, say $A$, can be thought of as a linear transformation within the same space. I could be as simple as basis change or some other transformation. In this way of ...
1
vote
0answers
17 views

Difference between sparse cholesky and cholesky decomposition

I am confused as to the difference between the regular cholesky decomposition and the sparse cholesky decomposition (i.e. that which is performed by LAPACK's CHOLMOD...
0
votes
0answers
25 views

Showing a useful result for Wisharts and Multivariate Beta random matrices

Let $\mathbf{A} \sim \text{Wishart}_m\left(k_a,\mathbf{V} \right)$ and $\mathbf{B} \sim \text{Wishart}_m\left(k_b,\mathbf{V} \right)$ be two full rank Wishart random matrices. Define $$ \mathbf{S} = \...
0
votes
0answers
24 views

How to Incorporate Skew Into Simulated Data?

Suppose I have a dataset $\mathbf{X}$ which is a $n \times m$ matrix of $n$ independent realizations of some $m$-dimensional random vector $\mathbf{x}$. I want to generate a new dataset $\mathbf{X}'$ ...
0
votes
0answers
84 views

Betareg error when running bootstrap-like simulations (Error in chol.default(K) : the leading minor of order 16 is not positive definite

A previous post discussed a similar case on non-positive definite covariance matrices resulting when producing half-normal residual plots using the package betareg. However, I would like additional ...
0
votes
0answers
62 views

Getting sets of random correlated variables

For the training of a machine learning model I need to add additional features, and these features are correlated. I need to run the model N times adding these features with random values, and for ...
0
votes
0answers
40 views

Add Noise to a Dataset

I've generated a dataset of 100 elements from a 3-variate Gaussian distribution with parameters $\mu = 0$ and $\Sigma = \begin{pmatrix}1 & \rho_1 & \rho_2 \\ \rho_1 & 1 & \rho_1 \\ \...
19
votes
5answers
25k 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 ...
0
votes
0answers
34 views

Variables estimation with Cholesky decomposition

I have the covariance matrix between log-returns of n variables. I suppose the distribution of the log-returns is normal for all the variables with average=0 but standard deviation in general $\neq$ 1....
2
votes
0answers
90 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 ...
1
vote
0answers
24 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
247 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
410 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
57 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
145 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. ...
6
votes
1answer
2k 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
1k 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
55 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
365 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 ...
2
votes
2answers
2k views
3
votes
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
648 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
390 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
569 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
616 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 ...
3
votes
1answer
334 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
380 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
125 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\...
2
votes
0answers
364 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
971 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 ...
15
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
393 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
243 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 ...
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
326 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
665 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
103 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
364 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
132 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 ...
7
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
690 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
957 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
74 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
554 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. ...