Displaying 20 results from an estimated 3000 matches similar to: "Choleski decomposition"
2012 Nov 30
4
qbinom
a=c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
b=c(0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1)
cor(a,b)= -1
a'=qbinom(a, 1, 0.5)
b'=qbinom(b, 1, 0.5)
why cor(a',b') becomes -0.5 ?
--
View this message in context: http://r.789695.n4.nabble.com/qbinom-tp4651460.html
Sent from the R help mailing list archive at Nabble.com.
2009 Nov 23
1
R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails
It works! But Once I have the square root of this matrix, how do I convert it
to a real (not imaginary) matrix which has the same property? Is that
possible?
Best,
Simon
>----Messaggio originale----
>Da: p.dalgaard at biostat.ku.dk
>Data: 21-nov-2009 18.56
>A: "Charles C. Berry"<cberry at tajo.ucsd.edu>
>Cc: "simona.racioppi at
2009 Nov 25
1
R: Re: R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails
Dear Peter,
thank you very much for your answer.
My problem is that I need to calculate the following quantity:
solve(chol(A)%*%Y)
Y is a 3*3 diagonal matrix and A is a 3*3 matrix. Unfortunately one
eigenvalue of A is negative. I can anyway take the square root of A but when I
multiply it by Y, the imaginary part of the square root of A is dropped, and I
do not get the right answer.
I tried
2005 Jan 21
1
Cholesky Decomposition
Can we do Cholesky Decompositon in R for any matrix
---------------------------------
[[alternative HTML version deleted]]
2009 Nov 26
0
R: RE: R: Re: R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails
Thanks for your message!
Actually it works quite well for me too.
If I then take the trace of the final result below, I end up with a number
made up of both a real and an imaginary part. This does not probably mean much
if the trace of the matrix below givens me info about the degrees of freedom of
a model...
Simona
>----Messaggio originale----
>Da: RVaradhan at jhmi.edu
>Data:
2009 Mar 10
5
Cholesky Decomposition in R
Hi everyone:
I try to use r to do the Cholesky Decomposition,which is A=LDL',so far I
only found how to decomposite A in to LL' by using chol(A),the function
Cholesky(A) doesnt work,any one know other command to decomposte A in to
LDL'
My r code is:
library(Matrix)
A=matrix(c(1,1,1,1,5,5,1,5,14),nrow=3)
> chol(A)
[,1] [,2] [,3]
[1,] 1 1 1
[2,] 0 2 2
2013 Jun 19
0
Simple example of variables decorrelation using the Cholesky decomposition
Dear all,
I made a simple test of the Cholesky decomposition in the package 'Matrix',
by considering 2 variables 100% correlated.
http://blogs.sas.com/content/iml/2012/02/08/use-the-cholesky-transformation-to-correlate-and-uncorrelate-variables/
The full code is below and can be simply copy&paste in the R prompt.
After uncorrelation I still have a correlation of +-100%...
2009 Mar 27
3
about the Choleski factorization
Hi there,
Given a positive definite symmetric matrix, I can use chol(x) to obtain U where U is upper triangular
and x=U'U. For example,
x=matrix(c(5,1,2,1,3,1,2,1,4),3,3)
U=chol(x)
U
# [,1] [,2] [,3]
#[1,] 2.236068 0.4472136 0.8944272
#[2,] 0.000000 1.6733201 0.3585686
#[3,] 0.000000 0.0000000 1.7525492
t(U)%*%U # this is exactly x
Does anyone know how to obtain L such
2012 Jul 31
1
about changing order of Choleski factorization and inverse operation of a matrix
Dear All,
My question is simple but I need someone to help me out.
Suppose I have a positive definite matrix A.
The funtion chol() gives matrix L, such that A = L'L.
The inverse of A, say A.inv, is also positive definite and can be
factorized as A.inv = M'M.
Then
A = inverse of (A.inv) = inverse of (M'M) = (inverse of M) %*%
(inverse of M)'
= ((inverse of
2009 May 20
3
qbinom (PR#13711)
Full_Name: Wolfgang Resch
Version: R 2.8.1 GUI 1.27
OS: OS X 10.4.11
Submission from: (NULL) (137.187.89.14)
Strange behavior of qbinom:
> qbinom(0.01, 5016279, 1e-07)
[1] 0
> qbinom(0.01, 5016279, 2e-07)
[1] 16
> qbinom(0.01, 5016279, 3e-07)
[1] 16
> qbinom(0.01, 5016279, 4e-07)
[1] 16
> qbinom(0.01, 5016279, 5e-07)
[1] 0
2002 Mar 08
1
Random data with correlation
Hello all.
First of all, I have only been using are a short time and I'm not an
expert in statistics either.
I have the following problem. I'm working with measurements of physical
samples, each measurement has about 4000 variables. I have 33 of those
samples. From those 400 variables I deduced through non-statiscal means
that I needed about 200 of them. I read those into a data.frame
2007 Jun 28
2
inaccuracy in qbinom with partial argument matching
Hi,
I found the following strange effect with
qbinom & partial argument matching
p0 <- pbinom(0, size = 3, prob = 0.25)
qbinom(p0, size = 3, prob = 0.25) ## 0 o.k.
qbinom(p0-0.05, size = 3, prob = 0.25) ## 0 o.k.
## positional matching:
qbinom(p0, 3, 0.25) ## 0 o.k.
## partial argument matching:
qbinom(p0 , s = 3, p = 0.25) ## 1 ???
qbinom(p0-0.05,
2005 Nov 23
1
qbinom returns NaN
Hi, All:
For most but not all cases, qbinom is the inverse of pbinom.
Consider the following example, which generates an exception:
> (pb01 <- pbinom(0:1, 1, .5, log=T, lower.tail=FALSE))
[1] -0.6931472 -Inf
Since "lower.tail=FALSE", Pr{X>1} = 0 in this context, and log(0) =
-Inf, consistent with the documentation.
However, the inverse of this does NOT
2009 Mar 11
0
anyone can help me with Cholesky Decomposition
Hi:
what I want to do is decompose the a symmetric matrix A into this form
A=LDL'
hence TAT'=D,T is inverse of (L)and T is a lower trangular matrix,and D is
dignoal matrix
for one case
A=1 1 1
1 5 5
1 5 14
T=inverse(L)= 1 0 0
-1 1 0
0 -1 1
D=(1,4,9)
I tried to use chol(A),but it returns only trangular, anyone know
the function can return
2005 Jul 05
1
calling fortran functions CHOL and DPOTRF form Fortran
Hi all,
I'm working out some Fortran code for which
I want to compute the Choleski decomposition of a covariance matrix
in Fortran.
I tried to do it by two methods :
1) Calling the lapack function DPOTRF.
I can see the source code and check that my call is correct,
but it does not compile with:
system("R CMD SHLIB ~/main.f")
dyn.load("~/main.so")
I get:
Error in
2012 May 03
0
Modified Cholesky decomposition for sparse matrices
I am trying to estimate a covariance matrix from the Hessian of a posterior mode. However, this Hessian is indefinite (possibly because of numerical/roundoff issues), and thus, the Cholesky decomposition does not exist. So, I want to use a modified Cholesky algorithm to estimate a Cholesky of a pseudovariance that is reasonably close to the original matrix. I know that there are R packages that
2001 Aug 19
2
error message in chol() (PR#1061)
Full_Name: Jerome Asselin
Version: 1.3.0
OS: Windows 98
Submission from: (NULL) (24.77.112.193)
I am having accuracy problems involving the computation of inverse of
nonnegative definite matrices with solve(). I also have to compute the
Choleski decomposition of matrices. My numerical problems involving solve()
made me find a bug in the chol() function. Here is an example.
#Please, load the
2009 Apr 01
2
Need Advice on Matrix Not Positive Semi-Definite with cholesky decomposition
Dear fellow R Users:
I am doing a Cholesky decomposition on a correlation matrix and get error message
the matrix is not semi-definite.
Does anyone know:
1- a work around to this issue?
2- Is there any approach to try and figure out what vector might be co-linear with another in thr Matrix?
3- any way to perturb the data to work around this?
Thanks for any suggestions.
2000 Apr 07
4
Bug in qbinom? (PR#511)
n_10;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one works as
expected
n_100;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one causes
severe problems
I cannot interrupt using ESC and I finally have to resort to the Windows
Task manager to kill the R session.
A friend of mine told me that he faced similar problems under Unix.
--please do not edit the information below--
Version:
2003 Dec 18
1
qbinom when probability is 1 (PR#5900)
Full_Name: Jonathan Swinton
Version: 1.8.0
OS: Windows 2000
Submission from: (NULL) (193.132.159.34)
Calling qbinom with a sample probability of 1 returns NaN
> qbinom(p=0.95,size=10,prob=1)
[1] NaN
I believe that this is wrong and that qbinom(p,size,prob=1) should always be
size for 0<p<=1.
The documentation says that
The quantile is defined as the smallest value x such that F(x)