[R] Cansisc: Error in eigen(eHe, symmetric = TRUE)

David L Carlson dcarlson at tamu.edu
Thu Jul 10 16:04:58 CEST 2014


In particular, look at the vegan Vignette, "Introduction to Ordination in vegan", particularly section 4 on constrained ordination which describes three approaches that seem relevant to your problem.

http://cran.r-project.org/web/packages/vegan/vignettes/intro-vegan.pdf

David Carlson

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Michael Friendly
Sent: Thursday, July 10, 2014 3:22 AM
To: Maria Judith Carmona H
Cc: r-help at r-project.org; John Fox
Subject: Re: [R] Cansisc: Error in eigen(eHe, symmetric = TRUE)

Maria

The variables 
Araceae,Begoniaceae,Bromeliaceae,Clusiaceae,Cyclanthaceae,Ericaceae,Gesneriaceae, 
Melastomataceae,Orchidaceae,Piperaceae,Pteridophyta
are frequencies (abundances?) of which most are 0 and this is not 
appropriate
as multivariate normal data.

There is probably a version of canonical analysis that takes such 
variables into account,
but I don't know specifically.  Have you looked at the vegan package and 
its references?

HTH
-Michael



On 10/07/2014 12:54 AM, Maria Judith Carmona H wrote:
> Dear John,
>
> I am including abundance values ​​in my data set so obviously I have 
> zero abundances.
> The problem is that if plot only the factors (biomasa, altdosel, 
> altsoto, cobertura, riqarb, elevacion, temperatura, precipitacion) I 
> get the graphic, the same happen when I included only the families, 
> but I want to see the effect of all these factors+families on this 
> plot . In fact I included only certain families:
>
> prueba4 <- 
> lm(cbind(biomasa,altdosel,altsoto,cobertura,riqarb,elevacion,temperatura,precipitacion,
> Araceae,Begoniaceae,Bromeliaceae,Clusiaceae,Cyclanthaceae,Ericaceae,Gesneriaceae,
> Melastomataceae,Orchidaceae,Piperaceae,Pteridophyta) ~ sitio, 
> data=bosques.p)
> canprueba2 <- candisc(prueba2, term="sitio", data=bosques.p, ndim=1)
> Error in eigen (EHD, symmetric = TRUE): infinite or missing values ​​ 
> in 'x'
> In addition: Warning message:
> In sqrt (wmd): NaNs produced
>
> You see I get the same error.
>
> Best regards,
> Judith
>
>
> On Wed, Jul 9, 2014 at 5:30 PM, John Fox <jfox at mcmaster.ca 
> <mailto:jfox at mcmaster.ca>> wrote:
>
>     Dear Maria Judith Carmona Higuita,
>
>     Since you didn't include enough information (such as your access
>     to your data) to reproduce the error, one can only guess. My
>     guess: you have fewer observations in your data set than response
>     variables on the LHS of the multivariate linear model.
>
>     I hope this helps,
>      John
>
>     ------------------------------------------------
>     John Fox, Professor
>     McMaster University
>     Hamilton, Ontario, Canada
>     http://socserv.mcmaster.ca/jfox/
>
>     On Wed, 9 Jul 2014 11:36:35 -0500
>      Maria Judith Carmona H <juditycarmona at gmail.com
>     <mailto:juditycarmona at gmail.com>> wrote:
>     > Hi,
>     >
>     > I have a problem using the function Candisc from Candisc Package.
>     >
>     > bosques1<-read.csv("bosques1.csv",header=TRUE,encoding="latin1")
>     > bosques1<-na.exclude(bosques1)
>     > attach(bosques1)
>     >
>     > #Modelo de regresión
>     > mod <-
>     >
>     lm(cbind(biomasa,altdosel,altsoto,cobertura,riqarb,elevacion,temperatura,precipitacion,
>     >                 Acanthaceae, Apocinaceae, Araceae, Araliaceae,
>     Arecaceae,
>     > Aspleniaceae, Begoniaceae,
>     >                 Blechnaceae, Bromeliaceae, Clusiaceae,
>     Cyclanthaceae,
>     > Davalliaceae, Denstaedtiaceae,
>     >                 Dryopteridaceae, Ericaceae, Gesneriaceae,
>     Hymenophyllaceae,
>     > indet., Lauraceae, Lomariopsidaceae, Lycopodiaceae, Melastomataceae,
>     > Moraceae, Myrsinaceae, Ophioglossaceae,
>     >                 Orchidaceae, Peperomia, Piperaceae, Poaceae,
>     Polypodiaceae,
>     > Primulaceae, Pteridaceae,
>     >                 Pteridophyta.taxa, Rubiaceae, Vittariaceae) ~ sitio,
>     > data=bosques1)
>     > summary(mod)
>     >
>     > #Gráfico 1
>     > can <- candisc(mod, term="sitio",data=bosques1,ndim=1,eig=T)
>     > ### The error happens here, so I can not run the plot.
>     > plot(can,titles.1d = c("Puntuación canónica", "Estructura"))
>     > summary(can, means = FALSE, scores = TRUE, coef = c("std"),
>     digits = 2)
>     >
>     > The error is:
>     > Error in eigen(eHe, symmetric = TRUE) : infinite or missing
>     values in 'x'
>     > In addition: Warning message:
>     > In sqrt(wmd) : NaNs produced
>     >
>     > Please help!
>     >
>     > --
>     > Maria Judith Carmona Higuita.
>     > Estudiante de Biología - Universidad de Antioquia
>     > Medellín - Colombia
>     >
>     > "La felicidad ocurre cuando encajas en tu vida, cuando encajas
>     > tan armónicamente que cualquier cosa que hagas es una alegría
>     para ti. De
>     > repente lo sabrás y la meditación te seguirá. Si amas el trabajo
>     que haces,
>     > si amas la manera como vives, entonces ya estás meditando y nada
>     puede
>     > distraerte." Osho
>     >
>     >       [[alternative HTML version deleted]]
>     >
>
>
>
>
>
>
>
> -- 
> Maria Judith Carmona Higuita.
> Estudiante de Biología - Universidad de Antioquia
> Medellín - Colombia
>
> "La felicidad ocurre cuando encajas en tu vida, cuando encajas 
> tan armónicamente que cualquier cosa que hagas es una alegría para ti. 
> De repente lo sabrás y la meditación te seguirá. Si amas el trabajo 
> que haces, si amas la manera como vives, entonces ya estás meditando y 
> nada puede distraerte." Osho
>


-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept. & Chair, Quantitative Methods
York University      Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA


	[[alternative HTML version deleted]]



More information about the R-help mailing list