Displaying 20 results from an estimated 1000 matches similar to: "eigen() may fail for some symmetric matrices, affects mvrnorm()"
2007 Aug 20
1
rv package, rvnorm function
In an attempt to learn to use the rv package, I have been working
through the examples in Jouni Kerman and Andrew Gelman's "Using Random
Variables to Manipulate and Summarize Simulations in R" (July 4, 2007).
I am using a Dell Precision 380n computer running Gentoo Linux and R
2.2.1 (the latest available through Gentoo's portage/emerge system).
Everything worked well until I
2011 Jan 22
1
faster mvrnorm alternative
Hello,
does anybody know another faster function for random multivariate normal
variable simulation? I'm using mvrnorm, but as profiling shows, my algorithm
spends approximately 50 % in executing mvrnorm function.
Maybe some of you knows much faster function for multivariate normal
simulation?
I would be very gratefull for advices.
--
View this message in context:
2006 Mar 03
1
NA in eigen()
Hi,
I am using eigen to get an eigen decomposition of a square, symmetric
matrix. For some reason, I am getting a column in my eigen vectors (the
52nd column out of 601) that is a column of all NAs. I am using the option,
symmetric=T for eigen. I just discovered that I do not get this behavior
when I use the option EISPACK=T. With EISPACK=T, the 52nd eigenvector is
(up to rounding error) a
2008 Dec 20
2
Problems installing lme4 on Ubuntu
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
While I'm not an R expert, I have used R on Windows XP. Now I've moved
to Ubuntu (Intrepid), and I'm trying to configure R to work with the
Gelman and Hill _Data Analysis Using Regression and
Multilevel/Hierarchical Models_. So far, it's not working.
I start by following the instructions for installing arm and BRugs at
2007 Mar 18
1
eigen returns NAs from a real matrix
Hi, All:
Attached please find a symmetric, indefinite matrix for which
'eigen(...)$vectors' included NAs:
> load("eigenBug.Rdata")
> sum(is.na(eigen(eigenBug)$vectors))
[1] 5670
> sessioninfo()
Error: could not find function "sessioninfo"
> sessionInfo()
R version 2.4.1 (2006-12-18)
i386-pc-mingw32
locale:
LC_COLLATE=English_United
2006 Mar 28
2
R crashes during 'eigen'
Hi all,
Hi,
When I want to compute the eigenvalues & eigenvectors of a specific
matrix, R crashes (i.e. it stops responding to any input). I've tried it
with different versions of R (2.1.1, 2.2.0, 2.2.1) - all with crashing
as result.
What I did before the crash was:
M <- as.matrix(read.table("thematrix",header=T))
eigen(M)
If, instead of eigen(M), I use eigen(M,
2002 Jul 09
1
EISPACK symmetric matrix eigenvalue routines
Can someone confirm that the EISPACK routines for eigenvalues of
symmetric matrix are in base R. They seem to be, but I can't seem to
locate where they are in the src tree.
Thanks.
Chong Gu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or
2003 Apr 18
1
Problem with eigen() and LAPACK
Hi all,
when testing the new improvements in the new 1.7.0-version I stumbled
over the following:
>eigen(matrix(c(0,.3,2,.9),2,2))
Error in eigen(matrix(c(0,.3,2,.9),2,2)) :
LAPACK routine DGEEV gave error code -13
>eigen(matrix(c(0,.3,2,.9),2,2),EISPACK=TRUE)
$values
[1] 1.3458236 -0.4458236
$vectors
[,1] [,2]
[1,] -1.1436890 -0.9760443
[2,] -0.7696018
2004 Jul 27
4
Problems with Lapack's eigen() on 64-bit
I'm only now realizing that we have severe problems with R on our
AMD 'Opteron' and 'Athlon64' clients running Redhat Enterprise
with all 64-bit libraries (AFAICS).
The Lapack problem happens for R-patched and R-devel both on
the Opteron and the Athlon64.
Here are platform details:
o "gcc -v" and "g77 -v" both end with the line
gcc version 3.2.3
1997 Aug 25
2
R-alpha: eigen and batch
Batch:
Putting q(save=F) at the end of my file does not work in my
context because I can no longer source the file without quitting. I
have that quit statement in my .First so that I always quit that way
interactively. The problem is that it is ignored in batch.
eigen:
The crash occurs on my 586 running Red Hat Linux 2.0.27 but not on
my son's 486 running SLackware Linix 2.0.29. We both
2006 Jan 02
1
R crash with complex matrix algebra when using EISPACK=TRUE
Dear subscribers of R-devel
I am experiencing that R crashes (further details are given below) in
some complex matrix calculations when EISPACK=TRUE has been specified in
eigen().
I discovered the behaviour some months ago just after the
release of R-2.2.0, and it has been lying on my desk since.
I apologise for not having nailed the problem down to a simple function
call, but I thought I
2011 Jul 06
1
Create simulated data's using mvrnorm
Hi All
This might be something very trivial but I seem to miss something in the
syntax or logic which makes me keep wandering around the problem without
arriving at a solution.
What I want to do is to simulate a sample data for performing cluster
analysis. I tried to use
x1= mvrnorm(10,rep(0.8,3),diag(3))
x2= mvrnorm(10,rep(0,3),diag(3))
x3= mvrnorm(10,rep(-0.5,3),diag(3))
x=rbind(x1,x2,x3)
2004 Feb 02
3
mvrnorm problem
I am trying to simulate draws from a multivariate normal using mvrnorm, and
am getting the following error message:
Error in mu + eS$vectors %*% diag(sqrt(pmax(ev, 0)), p) %*% t(X) :
non-conformable arrays
I do not understand why I am getting this message, since the vector of means
I am giving to the function is 13 by 1 and the variance matrix I am giving
to the function is 13
1997 May 18
2
R-alpha: Eigenvalue Computation Query
I have been looking at the "eigen" function and have reintroduced the
ability to compute (right) eigenvalues and vectors for non-symmetric
matrices. I've also made "eigen" complex capable.
The code is based on the eispack entry points RS, RG, CH, CG (which is
what S appears to use too). The problem with both the S and R
implementations is that they consume huge amounts
2008 Jul 05
5
help about random generation of a Normal distribution of several variables
Hello.
Somebody knows how can I generate a set of n random vectors of a
normal distribution of several variables?
For example, I want to generate n=100 random vectors of two dimensions
for a normal with mean c(0,1) and variance matrix:
matrix(c(2,1,1,3),2,2).
Thanks in advance,
Arnau.
2008 Jan 31
1
R2WinBUGS is broken
Dear R-users,
I am trying to use the following code to reproduce results from Prof.
Gelman's book, but have the listed error for R2WinBUGS version (the openbugs
version is good). I am using R-2.6.1 on windows XP, and all the R packages
are most current ones. schools.bug can be found at
http://www.stat.columbia.edu/~gelman/bugsR/runningbugs.html . Can anyone
help me to figure out what's
2011 May 07
1
generate multiple mvrnorm samples using apply-like
I want to generate multiple multivariate normal samples with different
mean vectors
and common covariance matrix.
I can do this with a loop, but can't quite figure out how to do it with
apply and friends.
In the example below, I want values to have 3 columns: group, x, y
# number of groups, and group means
x <- jitter(seq(2,10,by=2))
y <- x + rnorm(length(x), 0, .5)
means <-
2012 Jun 10
2
mvrnorm limits
Dear All,
I am using the following commands to generate a given dataset:
a <-c(0.348,0.007,0.503,0.58,0.21)
cov <-c(0.0448,0,0,0,0,0.0001,0.0001,0,0,0,-0.0055,-0.0005,0.0495,0,0,0.0218,0.0009,-0.0253,0.1103,0,-0.0102,-0.0007,0.00631,0.0067,0.0132)
b <-matrix(cov,nrow=5, ncol = 5, byrow = TRUE,dimnames = NULL)
g <-mvrnorm(10000,a,b)
is there a way to place limits on the simulated
2005 Jan 06
2
Generating Data mvrnorm and loops
Dear List:
I am generating N datasets using the following
Sigma<-matrix(c(400,80,80,80,80,400,80,80,80,80,400,80,80,80,80,400),4,4
)
mu<-c(100,150,200,250)
N=100
for(i in 1:N)
{
assign(paste("Data.", i, sep=''),
as.data.frame(cbind(seq(1:1000),(mvrnorm(n=1000, mu, Sigma)))))
}
With these datasets, I need to work on some of the variables and then
run each dataset
2009 Aug 17
1
Bayesian data analysis - help with sampler function
I have downloaded the Umacs (Universal Markov chain sampler) and submitted the following sample code from Kerman and Gelman.
s <-Sampler(
J=8,
sigma.y =c(15,10,16,11,9,11,10,18),
y =c(28, 8,-3,7,-1,1,18,12),
theta =Gibbs(theta.update,theta.init),
V =Gibbs(V.update,mu.init),
mu =Gibbs(mu.update,mu.init),
tau =Gibbs(tau.update,tau.init),