-------- Original Message --------
Subject: RE: svd in shapes[R]
Date: Thu, 28 May 2009 14:45:53 -0700 (PDT)
From: Ian Dryden <[email protected]>
To: <[email protected]>
References: <[email protected]>
Dear Fabio,
I have come across very occasional issues with the LAPACK
numerical routines in R. It might be worth using a different numerical
library. svd has an option LINPACK, so you could try
setting LINPACK=TRUE in the function prcomp1. Just copy
the code below into R and then run procGPA again.
###################################################################
prcomp1<-function (x, retx = TRUE, center = TRUE, scale. = FALSE, tol =
NULL)
{
x <- as.matrix(x)
x <- scale(x, center = center, scale = scale.)
s <- svd(x, nu = 0, LINPACK=TRUE)
if (!is.null(tol)) {
rank <- sum(s$d > (s$d[1] * tol))
if (rank < ncol(x))
s$v <- s$v[, 1:rank, drop = FALSE]
}
s$d <- s$d/sqrt(max(1, nrow(x) - 1))
dimnames(s$v) <- list(colnames(x), paste("PC", seq(len = ncol(s$v)),
sep = ""))
r <- list(sdev = s$d, rotation = s$v)
if (retx)
r$x <- x %*% s$v
class(r) <- "prcomp1"
r
}
#####################################################################
Kind regards,
Ian
-----Original Message-----
From: morphmet [mailto:[email protected]]
Sent: Thu 28/05/2009 9:47 PM
To: morphmet
Subject: Re: svd in shapes[R]
-------- Original Message --------
Subject: Re: svd in shapes[R]
Date: Thu, 28 May 2009 11:37:01 -0700 (PDT)
From: Michael Coquerelle <[email protected]>
To: <[email protected]>
References: <[email protected]>
Hi Fabio,
I got the same message several months ago. With my data set, 151
specimens and 415 (semi)landmarks in 3d, I never had a problem while
using procgpa from the library shapes. But when I started to analyze
just a subset of the data, let say 200 (semi)landmarks, I got this
message. So I subdivided my sample by the half, one half worked the
other not. So I tried to find out what was wrong with this second half.
I did several GPA with this wrong subsample minus 1 specimen. After
several GPA impossible to run untill the end with the same error mesage,
there was one GPA completed. I checked out the specimen I erased from
that GPA and this specimen had one pair of landmarks inverted. So your
problem might be similar, two landmarks can be inverted in one specimen
of your sample.
I hope that will help you.
Cheers,
Michael
----- Original Message -----
From: "morphmet" <[email protected]>
To: "morphmet" <[email protected]>
Sent: Thursday, May 28, 2009 8:07 PM
Subject: svd in shapes[R]
>
>
> -------- Original Message --------
> Subject: svd in shapes[R]
> Date: Thu, 28 May 2009 10:50:13 -0700 (PDT)
> From: Fabio de A. Machado <[email protected]>
> To: [email protected]
>
>
>
> Hi to all,
>
> I'm having some problems when I try to perform a GPA on a particularly
> large dataset with the package shapes [ R ]. The error msg is:
>
> Error in La.svd(x, nu, nv) : error code 1 from Lapack routine 'dgesdd'
>
> I have 495 shapes with 68 2d landmarks. I've tried to make some subsets
> and to remove some landmarks to identify the problem. The problem
seems to
> correlate with the size of the dataset, but I have already used the same
> script on a larger dataset and got no errors. I was also able to perform
> multiples GPAs on smaller samples within the full set and, again, got no
> errors.
>
> A quick search on the web showed that other people had similar problems
> while trying to perform a svd and also asked if it was related to the
size
> of the dataset, but I found no solutions.
>
> If anyone have any idea how to solve this, I would appreciate the help.
>
> cheers,
>
> Fábio de A. Machado
>
> Laboratório de Herpetologia/Morfometria
> Museu de Zoologia da USP
> Av. Nazaré, 481, Ipiranga
> São Paulo, SP, 04263-000
> +55 11 20658130
> +55 11 82631029
> [email protected] <mailto:[email protected]> ; [email protected]
> <mailto:[email protected]>
>
>
> --
> Replies will be sent to the list.
> For more information visit http://www.morphometrics.org
>
--
Replies will be sent to the list.
For more information visit http://www.morphometrics.org
This message has been checked for viruses but the contents of an
attachment may still contain software viruses, which could damage your
computer system: you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
--
Replies will be sent to the list.
For more information visit http://www.morphometrics.org