similar to: R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails

Displaying 20 results from an estimated 200 matches similar to: "R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails"

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
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:
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
2012 Nov 30
1
Choleski decomposition
m <- matrix(nrow=5, ncol=5) m <- ifelse(row(m)==col(m), 1, 0.2) c <- chol(m) # Choleski decomposition u <- matrix(rnorm(2000*5), ncol=5) uc <- u %*% c cr <- pnorm(uc) cr <- qbinom(cr,1,0.5) cor(cr) I expected that the cor(cr) to be 0.2 as i set in m, but the result is around 0.1. Why is that? Thanks -- View this message in context:
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 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
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
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()
2016 Sep 05
2
LLVM 3.8.0 - Adding new instruction to a basic block
Why not just use Instruction::insertAfter()? I->insertAfter(new_inst); On Mon, Sep 5, 2016 at 8:13 AM, Ryan Taylor via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Try incrementing the iterator before using. > > On Sep 5, 2016 10:26, "Simona Simona via llvm-dev" < > llvm-dev at lists.llvm.org> wrote: > >> On Mon, Sep 5, 2016 at 3:20 AM, Daniel
2016 Sep 05
2
LLVM 3.8.0 - Adding new instruction to a basic block
On Mon, Sep 5, 2016 at 3:20 AM, Daniel Berlin <dberlin at dberlin.org> wrote: > > > On Sun, Sep 4, 2016 at 1:06 PM, Simona Simona via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hello, >> >> I'm trying to add a new instruction after a given instruction in a basic >> block. >> Until LLVM 3.7, I was using the following code:
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 Feb 08
0
Poisson and neg. bin. regression with random effects
Hi there, I have relative abundance data for 13 mammal species that I collected at various sites that ranged in road density. I'm trying to determine the effect of road density on animal abundance across body sizes. For most species, I have data that was collected in one year but for a few species I have two years of complete data, and would like to use both. Since I have count data, I'm
2007 Nov 06
0
Discrepancy of Neg. Binomial Estimation in R
Dear all, I have a puzzle regarding the estimation of Neg. Binomial event count model in R. I would greatly appreciate if anyone could shed some light on my puzzle. Using the glm.nb command, or the zelig command developed by Gary King et. al., I obtain the same point estimates in R as well as in Stata. However, if I write my own likelihood function to estimate a neg. binomial event count
2011 Jun 27
1
Neg Binomial In GEE
Hi, I want to fit a GEE with a negative binomial distribution. I have uesd already a poisson glm and then neg binommial to deal with alot of dispersion. In my neg binomial residuals i have some patterns so i have implemented a GEE, but only with a poisson family as i couldnt with neg binomial. However the residual patterns in fact look worse here. When i try and put neg binomial family it
2009 Feb 18
1
Help on warning message from Neg. Binomial error during glm
I am using glm.nb, a ~b*c ( b is categorical and c is continuous). when I run this model I get the warning message: Warning messages: 1: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > : iteration limit reached 2: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > : iteration limit reached What does this mean? -- Graduate
2014 Nov 23
0
[PATCH] nv50/ir: set neg modifiers on min/max args
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=86618 Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp index 077eba8..3048f3d 100644 ---
2005 Jun 30
1
Dispersion parameter in Neg Bin GLM
Hi, Can someone tell me if it is possible to set the dispersion parameter constant when fitting a negative binomial glm in R? I've looked at the documentation and can't find the appropriate argument to pass. In STATA I can type: nbreg depvar [indepvar...], offset(offset) dispersion(constant). Thank you [[alternative HTML version deleted]]
2005 Jun 30
1
RE : Dispersion parameter in Neg Bin GLM
Edward, you also can use the package aod on CRAN, see the help page of the function negbin. Best Matthieu An example: > library(aod) > data(dja) > negbin(y ~ group + offset(log(trisk)), ~group, dja, fixpar = list(4, 0)) Negative-binomial model ----------------------- negbin(formula = y ~ group + offset(log(trisk)), random = ~group, data = dja, fixpar = list(4, 0))