Displaying 20 results from an estimated 8000 matches similar to: "BMS package and leading minor problems"
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()
2010 Aug 10
0
Error: the leading minor of order 6 is not positive definite
Hey guys,
I'm trying to run a Canonical Correlation Analysis (CCA) between two data
sets. But for my case I am dealing with data sets(which are stored as two
matrices X and Y) in which the number of experimental units is greater than
the number of variables, so I want to use a sample from my "mothdata" data
set which I store in a matrix called "Yr". I am using the cc()
2018 May 05
1
error in chol.default((value + t(value))/2) : , the leading minor of order 1 is not positive definite
Dear friends - I'm having troubles with nlme fitting a simplified model
as shown below eliciting the error
Error in chol.default((value + t(value))/2) :
? the leading minor of order 1 is not positive definite -
I have seen the threads on this error but it didn't help me solve the
problem.
The model runs well in brms and identifies the used parameters even with
fixed effects for TRT?
2010 Sep 07
2
Plotting longitudinal data
Hello,
Hope that someone could help me plotting longitudinal data below:
7213 3333330001 0.8300 13.05.09 1
1 3333330001 0.8700 09.02.05 NULL
4797 3333330001 0.7700 21.03.07 NULL
2399 3333330001 0.7800 12.04.06 NULL
2400 3333330002 NULL 27.03.06 NULL
7230 3333330002 0.8200 14.05.09 0
2 3333330002 0.8400 09.02.05 NULL
4798 3333330002 0.8700 20.03.07 0
4799 3333330003 0.9000 20.03.07 13
2401
2012 Apr 23
0
linear model benchmarking
I cleaned up my old benchmarking code and added checks for missing
data to compare various ways of finding OLS regression coefficients.
I thought I would share this for others. the long and short of it is
that I would recommend
ols.crossprod = function (y, x) {
x <- as.matrix(x)
ok <- (!is.na(y))&(!is.na(rowSums(x)))
y <- y[ok]; x
2010 Dec 31
2
Class "coef.mer" into a data.frame?
Hello,
Could somebody please tell me what am I doing wrong in following?
I try extract coefficients (using arm-package) from the lmer
frunction, but I get the
following warning:
a<-data.frame(coef(res))
Error in as.data.frame.default(x[[i]], optional = TRUE,
stringsAsFactors = stringsAsFactors) :
cannot coerce class "coef.mer" into a data.fram
I think I have done it before
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
2011 Dec 22
1
try to silence errors
I am trying to use the dmt function in the package {mnormt}. Throughout my
algorithm, the covariance matrix is sometime calculated to be singular.
When attempting to calculate the dmt function with a covariance that is not
positive definite, I would like it to return Inf or NaN instead of an error
message.
I have been using the try function, however it is not yeilding the desired
result. (I did
2005 Oct 07
3
panel data unit root tests
Hi,
The question is as follows: has anyone coded panel data unit root tests
with R? Even the "first generation" tests (see e.g. Levin & Lin 1993;
Pesaran, & Smith & Im 1996; Maddala & Wu 1999) would be sufficient for my
needs. To my understanding, these are rather easy to code, but as I have
taken just my first steps in coding with R, existing code would save me
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
2007 Jun 22
2
fitCopula
I am using R 2.5.0 on windows XP and trying to fit copula. I see the
following code works for some users, however my code crashes on the
chol. Any suggestions?
> mycop <- tCopula(param=0.5, dim=8, dispstr="ex", df=5)
> x <- rcopula(mycop, 1000)
> myfit <- fitCopula(x, mycop, c(0.6, 10), optim.control=list(trace=1),
method="Nelder-Mead")
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:
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 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
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.
2006 Apr 24
1
Handling large dataset & dataframe [Broadcast]
Here's a skeletal example. Embellish as needed:
p <- 5
n <- 300
set.seed(1)
dat <- cbind(rnorm(n), matrix(runif(n * p), n, p))
write.table(dat, file="c:/temp/big.txt", row=FALSE, col=FALSE)
xtx <- matrix(0, p + 1, p + 1)
xty <- numeric(p + 1)
f <- file("c:/temp/big.txt", open="r")
for (i in 1:3) {
x <- matrix(scan(f, nlines=100), 100,
2005 Mar 20
1
Re: [R-SIG-Mac] NaN and linear algebra
No, blas/veclib is tested, so aprt this extreme case you should report
some other more commonly used cases in which something fails on OS X.
This will help us to work it out.
As said, I'll try some tests without using veclib and let you know.
I've fowarded this mail to r-devel, which seems to be the right place,
so for future msg on the subject please use r-devel.
stefano
On
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 Oct 24
2
Samba + LDAP + TLS
Hi!
I'm a bit new to Samba+LDAP integration, and most likely because of that
I experienced this morning something I can't fully understand. I would
appreciate if someone could explain to me what was really wrong.
So, our name server was unavailable this morning due to OS update.
Division's Samba and LDAP services are running on same server, and Samba
is using TLS in connecting to
2007 Oct 03
1
inverse of matrix made by low.tri function
Hi all,
I am using R trying to get a inverse matrix of (X^T)X , but I keep getting
the error
message like: no b argument and no default value for sprintf(gettext(fmt,
domain = domain), ...) .
--------------------------------------------------------------------------------------------
# my code
X<-Matrix(rep(1,500),100,5)
X[lower.tri(X)]<-1-10^-7
XtX<- t(X)%*% X
XtXu<-lu(XtX)