Re: row weights in co-inertia

From: Stephane Dray (dray@biomserv.univ-lyon1.fr)
Date: Tue Dec 21 2004 - 15:44:19 MET

• Next message: Frank Dziock: "Re: row weights in co-inertia"

Hi !

At 07:55 21/12/2004, you wrote:

>
>I am trying to perform a co-inertia in ADE-4 with R 2.0.0 based on a Fuzzy
>CA of 155 species and 11 trait variables with 59 trait categories. The
>other datatable has 155 species and 37 sites.
>
>FCA was performed on the traits-species table (traits) with traits in
>columns and species in lines/rows
>CA was performed on the transposed species-sites table (artentranspo) with
>sites in columns and species in lines/rows
>
>######################
>blocks <- c(4,11,3,4,3,4,4,7,3,9,7) ##no. of categories per variable
>Daten/Sachsen-Anhalt/Ergebnisse/Analysen/traits.txt", sep="\t")
>
>artentranspo<-data.frame(t(arten))
>ca<-dudi.coa(artentranspo, scan=F, nf=2)
>traits2<-prep.fuzzy.var(traits, blocks, row.w=ca\$lw) ## new FCA with row
>weights ca\$lw from the CA
>
>fca <- dudi.fca(traits2, scann=F, nf=4)
>coinert<-coinertia(fca,ca,scannf=F, nf=4)
>plot(coinert)
>randtest.coinertia(coinert,nrepet=9999)
>######################
>
>In the manual (p. 52) it says that in "dudi" cw are row weights, but this
>doesnt work for my coinertia, so I took "lw", which is said to be column
>weights, which I doubt!?
>
>The co-inertia seems to have worked with my data and using ca\$li as row
>weights, because I got a summary plot.

I am not sure to really understand what you say. It seems there is an error
which must be corrected but can you tell us about which "manual" are you
talking ?

row weights are in lw (line weights)
column wights in cw (column weights)
for all objects of the class dudi.
Your example seems correct, but I suppose that there is a mistake in your
text when you say ca\$li as row weights, it is ca\$lw I suppose ??

>But in the Monte-Carlo test an error occured "non-equal row weights" with
>eitther setting "fixed=0" or 1 or 2.
>
>I would be delighted if someone could help me by telling me what is "lw"
>and "cw" and maybe a hint on what went wrong in the Monte-Carlo test.

you do not receive an error but a warning, It is quite different. You must
fix the table on which you apply COA because row weights are computed from
this analysis. And the real message that you obtain is:

> dudi2 <- dudi.coa(doubs\$poi, scan = FALSE, nf = 2)
> dudi1 <- dudi.pca(doubs\$mil, scale = TRUE, row.w=dudi2\$lw,scan =
FALSE, nf = 3)
> coin1 <- coinertia(dudi1,dudi2, scan = FALSE, nf = 2)

> rnd1=randtest(coin1,fixed=2)
Warning: non uniform weight. The results from permutations
are valid only if the row weights come from the fixed table.
The fixed table is table Y : doubs\$poi

Here is is correct, I fix the table on which coa is applied.

>
>With best wishes from sunny Leipzig,
>
>Frank

Here in Montreal it is sun, snow and cold (-25, -38 with the wind).

Stéphane DRAY
--------------------------------------------------------------------------------------------------

Département des Sciences Biologiques
Université de Montréal, C.P. 6128, succursale centre-ville