# Questions tagged [cholesky]

The tag has no usage guidance.

57 questions
Filter by
Sorted by
Tagged with
22 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}'$ ...
79 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 ...
61 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 ...
34 views

352 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 ...
870 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 ...
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 ...
362 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 ...
232 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 ...
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 ...
317 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 ...
645 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 ...
89 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 ...
315 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 ...
96 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 ...
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 ...
630 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$ ...
907 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: ...
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 ...
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 ...
531 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. ...
824 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 ...
492 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 ...
### 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 ...