[R] Cansisc: Error in eigen(eHe, symmetric = TRUE)
John Fox
jfox at mcmaster.ca
Thu Jul 10 03:12:45 CEST 2014
Dear Judith,
I take it from your reply that you have *more* observations than there are response variables in the multivariate linear model, but since you still haven't provided access to the data, it's still impossible to tell what the problem is.
I don't follow your application, possibly because I'm ignorant of the area in which you work, but also possibly because there's insufficient information about that too. When you say that there are 0 abundances, I assume that this doesn't mean that some abundance values are 0 for *all* observations. If that's the case, then that would I believe produce a computational error, though not I think the one you observed. As an aside, if there are many 0 abundances then using the multivariate normal distribution for the responses likely isn't reasonable, which is what you're doing, but this in itself won't produce a computational error in candisc().
So, to reiterate, without the data, there's not much more that I can say. Because I'm out of town and will be traveling tomorrow, I'm unlikely to be able to respond again for several days.
Best,
John
On Wed, 9 Jul 2014 17:54:56 -0500
Maria Judith Carmona H <juditycarmona at gmail.com> 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> 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> 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
------------------------------------------------
John Fox, Professor
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/
More information about the R-help
mailing list