Displaying 20 results from an estimated 259 matches for "chols".
Did you mean:
chol
2006 Feb 20
2
Matrix / SparseM conflict (PR#8618)
Full_Name: David Pleydell
Version: 2.2.1
OS: Debian Etch
Submission from: (NULL) (193.55.70.206)
There appears to be a conflict between the chol functions from the Matrix and
the SparseM packages. chol() can only be applied to a matrix of class dspMatrix
if SparseM is not in the path.
with gratitude
David
> library(Matrix)
> sm <- as(as(Matrix(diag(5) + 1), "dsyMatrix"),
2004 Nov 18
1
Method dispatch S3/S4 through optimize()
I have been running into difficulties with dispatching on an S4 class
defined in the SparseM package, when the method calls are inside a
function passed as the f= argument to optimize() in functions in the spdep
package. The S4 methods are typically defined as:
setMethod("det","matrix.csr", function(x, ...) det(chol(x))^2)
that is within setMethod() rather than by name before
2009 Jul 03
3
Variable names in lattice XY-plot
Hi,
how can I get a more descriptive text
instead of the variable names in my XY-lattice plot,
according to the table below?
Variable text
acet = "Acetylaspartate Thalamus"
chol = "Choline Thalamus"
acetp = "Acetylaspartate parieoc"
ino = "Inositole Thalamus"
I could not find a solution.
Please have a look at my syntax.
Thanks a lot,
2011 Oct 23
1
A problem with chol() function
I think I am missing something with the chol() function. Here is my calculation:
?
> mat
???? [,1] [,2] [,3] [,4] [,5]
[1,]??? 1??? 3??? 0??? 0??? 0
[2,]??? 0??? 1??? 0??? 0??? 0
[3,]??? 0??? 0??? 1??? 0??? 0
[4,]??? 0??? 0??? 0??? 1??? 0
[5,]??? 0??? 0??? 0??? 0??? 1
> eigen(mat)
$values
[1] 1 1 1 1 1
$vectors
???? [,1]????????? [,2] [,3] [,4] [,5]
[1,]??? 1 -1.000000e+00??? 0??? 0??? 0
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
2005 Oct 27
0
Column names in qr() and chol() (PR#8258)
I am using 2.2.0
If the QR decomposition of an N*M matrix is such that the pivoting order
is not 1:M, Q%*%R does not result in the original matrix but in a
matrix with the columns permuted. This is clearly intentional, and
probably to be expected if pivoting is used --- chol() behaves in the
same manner (it would perhaps be nice if the qr help page made that
clear in the same way that the chol()
2002 Feb 20
1
Pivoting in chol
Hi Everyone,
I have modified my version of R-1.4.1 to include choleski with pivoting
(like in Splus). I thought R-core might consider including this in the
next version of R, so I give below the steps required to facilitate
this.
1. Copied Linpack routine "dchdc.f" into src/appl
2. Inserted line F77_SUBROUTINE(dchdc) in src/appl/ROUTINES
3. Inserted "dchdc.f" into
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
2007 Nov 24
1
Hmisc: can not reproduce figure 4 of Statistical Tables and Plots using S and LATEX
Dear R-users:
I can not reproduce figure 4 of *Statistical Tables and Plots using S and
LATEX* by Prof. Frank Harrell with the following code:
rm(list=ls())
library(Hmisc)
getHdata(pbc)
attach(pbc)
age.groups <- cut2(age, c(45,60))
g <- function(y) apply(y, 2, quantile, c(.25,.5,.75))
y <- with(pbc, cbind(Chol=chol,Bili=bili))
# You can give new column names that are not legal S names
1999 Sep 27
2
chol() dimnames
Hi Everyone,
Just a minor point, but could chol() be changed to include the dimnames of
the original matrix? This will ensure that x and t(R) %*% R have the same
dimnames, where R <- chol(x). So we just need to insert
if (!is.null(dx <- dimnames(x)))
dimnames(z$v) <- dx
ahead of the return. Cheers, Jonathan.
Jonathan Rougier Science Laboratories
2010 Sep 19
1
Problem with "list"
Dear all, I have following list object:
dat <- vector("list", length=4)
for(i in 1:4) dat[[i]] <- diag(rnorm(5)^2)
names(dat) <- paste("A", 1:4, sep="")
It is ok upto this point. However if I want apply, suppose chol()
function on any of it's element, I am getting error:
> chol(dat['A1'])
Error in chol.default(dat["A1"]) :
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
2001 Mar 13
1
.C-calls
Dear all,
(sorry I got the wrong button for subscribing a minute ago)
At the moment I'm writing on a package for random field
simulation that I'd like to make publically availabe
in near future.
To this end I've asked Martin Maechler to have a look
at my R-code. He was very surprised about how
I perform the ".C"-calls, and encouraged me to
make this request for comments.
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
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
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 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
2002 Jun 05
1
as.generic
I've been writing some matrix-type methods for a new class of sparse matrices
and for most methods this has been straightforward. However, there are
examples, like %*% and chol, that (apparently) R doesn't automatically
recognize as generic. What to do in these cases? At this point, I've
been writing new generic methods with slightly perturbed names %m% and
cholesky for example in
2007 Oct 02
3
mcv package gamm function Error in chol(XVX + S)
Hi all R users !
I'm using gamm function from Simon Wood's mgcv package, to fit a spatial
regression Generalized Additive Mixed Model, as covariates I have the
geographical longitude and latitude locations of indexed data. I include a
random effect for each district (dist) so the code is
fit <- gamm(y~s(lon,lat,bs="tp", m=2)+offset(log(exp.)),
random=list(dist=~1),
2008 Dec 01
1
gee + rcs
Hi all,
I have fitted a gee model with the gee package and included restricted cubic spline functions. Here is the model:
chol.g <- gee(SKIN ~ rcs(CHOLT, 3), id=ID, data=chol, family=binomial(link="logit"), corstr="exchangeable")
To extract the log odds I use:
predict.glm(chol.g, type = "link")
Now I want to compute the logg odds for specific CHOLT values