Displaying 2 results from an estimated 2 matches for "traingular".
2009 Sep 11
1
transposing a distance matrix in R
...listserv. Can one just
> send a message to r-help at r-project.org?
You can subscribe to the listserv from here:
https://stat.ethz.ch/mailman/listinfo/r-help
> Here goes:
> How does one convert a triangular distance matrix into a single
> column distance matrix?: e.g.,
>
> traingular:
> A B C
> A na na na
> B 1 na na
> C 0 1 na
>
> single column:
> BA 1
> CA 0
> CB 1
Getting the distances from your matrix is pretty straightforward since
they're all in the lower triangle of the matrix, see: ?lower.tri
R> m <- matrix(c(NA,1,0,...
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