Re: une autre question: MCOA

From: Pierre BADY (pierre.bady@univ-lyon1.fr)
Date: Wed Mar 09 2005 - 01:00:11 MET

  • Next message: Joseph Le Cuziat: "Re: ripley : help - Fonctions L"

    hi,

    I’m sorry, but it’s difficult question ... I haven't answer ... ;"(

    To use MCOA, we need only 1 common dimension. The individual tables can
    associate by the row (with the same weight of rows) or by the columns (with the
    same weight of colunms). Normally, if all tables have the same dimensions (same
    rows and same columns), it is not a problem.

    # example 1: same rows, different columns
    require(ade4)
    data(escopage)
    w <- data.frame(scale(escopage$tab))
    w <- ktab.data.frame(w, escopage$blo, tabnames = escopage$tab.names)
    for(i in 1 : length(escopage$blo))
    print(dim(w[[i]]))

    mcoa1 <- mcoa(w,option="uniform",scannf=F)
    mcoa2 <- mcoa(w,option="lambda1", scannf=F)
    mcoa3 <- mcoa(w,option="inertia", scannf=F)
    mcoa1
    mcoa2
    mcoa3

    # example 2: same rows, same columns
    data(meaudret)
    mil <- meaudret$mil
    indic <- NULL
    for(i in 1:4)
    indic <- c(indic, rep(i,5))
    ldudi <- list()
    for(i in 1:4)
    ldudi[[i]] <- dudi.pca(mil[indic==i,],scale=T,center=T,scannf=F)
    ktab1 <- ktab.list.dudi(ldudi, tabnames=c("sp","su","au","wi"))
    for(i in 1 : length(ktab1$blo))
    print(dim(ktab1[[i]]))

    mcoa1 <- mcoa(ktab1,option="uniform",scannf=F)
    mcoa2 <- mcoa(ktab1,option="lambda1", scannf=F)
    mcoa3 <- mcoa(ktab1,option="inertia", scannf=F)
    mcoa1
    mcoa2
    mcoa3

    # La.svd : Compute the singular-value decomposition of a rectangular matrix.
    ?La.svd

    The problem is associated with the function La.svd and is maybe inherent in your
    data set.

    hope this help,

    P.BADY

    PS: Your French is better than my English :)

    En réponse à Aedin <Aedin.Culhane@ucd.ie>:

    > Bonjour,
    >
    > je voudrais poser une autre question sur MCOA s'il vous plait,
    >
    > If I run mcoa on 3 datasets with equal nrow but unequal ncol, the
    > options "lambda1" and "uniform" are ok but option= "inertia" fails.
    > Should I expect this?
    >
    > mcoa(testdata$ktab, option="lambda1")
    > mcoa(testdata$ktab, option="uniform")
    > mcoa(testdata$ktab, option="inertia")
    > Error in La.svd(x, nu, nv) : error code 1 from Lapack routine
    > dgesdd
    >
    > If I run the analysis on a dataset with equal nrow, ncol. I don't get
    > the error with option="inertia".
    >
    > Is this expected?
    >
    > Merci
    > Aedin
    >
    >
    > (mmh.. Not so sure my french is improving!!! Any tips for me when
    > talking to the many French supporters in Dublin at the weekend???)
    >
    >
    >

    ---------------------------------------------------------
    Pierre BADY <°)))><
    Université Claude Bernard Lyon 1
    UMR CNRS 5023, LEHF
    bat Alphonse Forel
    43 boulevard du 11 novembre 1918
    F-69622 VILLEURBANNE CEDEX
    FRANCE
    TEL : +33 (0)4 72 44 62 34
    FAX : +33 (0)4 72 43 28 92
    MEL : pierre.bady@univ-lyon1.fr
    http://limnologie.univ-lyon1.fr
    http://pierre.bady.free.fr/ (in construction)



    This archive was generated by hypermail 2b30 : Wed Mar 09 2005 - 01:01:31 MET