Re: [R] multinomial logit estimation
Hi all, You can consult help of the functions multinom (library(MASS)) and vglm (library(VGAM)). hope this help, Pierre Selon Walter Paczkowski <[EMAIL PROTECTED]>: > Good morning, > > I'd like to estimate a simple multinomial logit model in R (not a McFadden > conditional logit). For instance, I'd like to estimate the probability of > someone having one of eight titles in a company with the independent > variables being the company characteristics. A binary logit is well > documented. What about the multinomial? > > Thanks, > > Walt Paczkowski > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] PCA with not non-negative definite covariance
Hi , hi all, > Am I correct to understand from the previous discussions on this topic (a > few years back) that if I have a matrix with missing values my PCA options > seem dismal if: > (1) I dont want to impute the missing values. > (2) I dont want to completely remove cases with missing values. > (3) I do cov() with use=pairwise.complete.obs, as this produces > negative eigenvalues (which it has in my case!). (4) Maybe you can use the Non-linear Iterative Partial Least Squares (NIPALS) algorithm (intensively used in chemometry). S. Dray proposes a version of this procedure at http://pbil.univ-lyon1.fr/R/additifs.html. Hope this help :) Pierre __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Correspondence analysis with R -follow up
Hi, Hi all, > thank you for your answers; i've tried both cca from vegan library, and > dudi.coa from ade4 library; one last question: my deal is mainly with > contingency tables, like the one i'm posting here > > acciaieria<-c(.41,.02,.44,.04,.09) > laminatoio<-c(.34,.28,.26,.01,.11) > fonderia<-c(.48,.05,.34,.08,.05) > leghe<-c(.45,.19,.25,.03,.08) > pct<-cbind(acciaieria,laminatoio,fonderia,leghe) > pct<-data.frame(pct,row.names=c("normale","preparaz.","manutenz.","installaz.","trasferim.")) > the data.frame "pct" is not a contingency table. > BUT...cca and dudi.coa seem to return quite different graphical results; > where am i doing wrong? > Do they do the same to you with the table above? graphicals reults are similar. see the argument "method" in the function scatter.coa (library ade4). "... method: an integer between 1 and 3 1 Rows and columns with the coordinates of lambda variance 2 Rows variance 1 and columns by averaging 3 Columns variance 1 and rows by averaging ..." #example : require(ade4) data(rpjdl) coa1 <- dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4) require(vegan) coa2 <- cca(rpjdl$fau) # biplot representations par(mfrow=c(2,2)) plot(coa2,type="text") ? scatter.coa scatter(coa1,method=1) scatter(coa1,method=2) scatter(coa1,method=3) hope this help :) Pierre __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Correspondence analysis with R
Hi, Hi all, > i'm having some trouble performing correspondence analysis with R for Mac OS > X. Does anyone know about some useful package? > And also, if i had found coordinates of points representing row and column > profiles, how do i put them in a single figure with labels identifying each > one of them? > This thing is getting me almost crazy. you can see the package vegan and/or ade4: library(vegan) ?cca ?plot.cca # argument: type library(ade4) ?dudi.coa ?scatter.coa ?s.label # arguments: add.plot and label hope this help :) Pierre __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Nested model and variance partitioning
hi, hi all, > I am not quite sure what you mean by "outcome" but I try to be more precise. > I have 4 spatial scales with: > - One sample per habitat (i.e. substratum) > - Many habitats per site > - One or many sites per river maybe, you can use a more general variable type of river (?) > - Many rivers per regions > - Two regions > Each scales is described by one or many variables: > - Habitat: type of substratum > - Site: altitude, distance from the source, slope, drainage area > - River: drainage area, altitude of the source, slope, type of geology > - Regions: 2 modalities > First I could try a nested ANOVA such as: > SR = habitat + Site / River / Region > But I am rather interested by which variables in each scales explains the > species richness variance. So something like this: > SR = substratum + (alt+dfs+sl+da) / (da+as+s+geol) / Region > But I don't know if i) if it is the good model and I dont know. In your context, the organisation of the stratification is an ecological problem. > ii) how to proceed with the lmne package. You can consult : - the documentation of the package nlme - http://zoonek2.free.fr/UNIX/48_R_2004/17.html (english version : http://zoonek2.free.fr/UNIX/48_R/13.html). In this document, there is many information about the procedure of variance decomposition with R. - http://cran.r-project.org/doc/Rnews/Rnews_2005-1.pdf (see Fitting linear mixed models in R by Douglas Bates) - etc. Regards, Pierre > > > > > > > Selon [EMAIL PROTECTED]: > > > hi, hi all, > > > > > > > Dear R users, > > > I face to a nested pattern and despite the numerous examples in the help > I > > am > > > still confused. > > > I sampled bugs in different habitats within sites which were within > rivers > > > themselves within different regions. > > > The habitat correspond to different substrata (not systematically present > > in > > > all sites). For rivers and sites, I have environemental variables (e.g. > > altitude > > > and slope of the site, drainage area and geology of the river) and I have > > > only 2 regions. Note that sometimes I have only one site per river. > > > I would like to know the part of each spatial scale described by > > > environmental > > > data in the species richness variance. For instance is the drainage area > > at > > > the river scale that explains a large amount of species richness variance > > or > > the > > > altitude of the site, or the substratum, etc. > > > > > > The design of our data is complex. What is your outcome ? > > > > > > > I looked into the nlme package but I did not found how to proceed > > > > The reference document about the package nlme is certainly Pinheiro J. C. > & > > Bates D. M. (2000) Mixed-effects models in S and S-plus. Springer Verlag, > > New > > York. 528 pp. > > > > but there is many information about this subject on the WEB (see > > http://www.google.fr/search?hl=fr&q=nlme&btnG=Recherche+Google&meta=) > > > > > > Regards, > > > > Pierre > > > > > > > > > > -- > > Ce message a été envoyé depuis le webmail IMP (Internet Messaging Program) > > > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Nested model and variance partitioning
hi, hi all, > Dear R users, > I face to a nested pattern and despite the numerous examples in the help I am > still confused. > I sampled bugs in different habitats within sites which were within rivers > themselves within different regions. > The habitat correspond to different substrata (not systematically present in > all sites). For rivers and sites, I have environemental variables (e.g. altitude > and slope of the site, drainage area and geology of the river) and I have > only 2 regions. Note that sometimes I have only one site per river. > I would like to know the part of each spatial scale described by > environmental > data in the species richness variance. For instance is the drainage area at > the river scale that explains a large amount of species richness variance or the > altitude of the site, or the substratum, etc. The design of our data is complex. What is your outcome ? > I looked into the nlme package but I did not found how to proceed The reference document about the package nlme is certainly Pinheiro J. C. & Bates D. M. (2000) Mixed-effects models in S and S-plus. Springer Verlag, New York. 528 pp. but there is many information about this subject on the WEB (see http://www.google.fr/search?hl=fr&q=nlme&btnG=Recherche+Google&meta=) Regards, Pierre __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] mca id numbers
hi, hi all, > Is it possible to make disappear the id numbers from scatter.dudi (mc > analysis) ? yes :) > > a <- as.factor(c(1, 2, 3, 2, 1)) > b <- as.factor(c(3, 2, 3, 1, 1)) > x <- as.factor(c(1, 2, 2, 1, 3)) > y <- as.factor(c(2, 2, 3, 1, 1)) > > dat <- data.frame(a=a, b=b,x=x,y=y) > summary(dat) > dat > require(ade4) > dat.acm <- dudi.acm(dat, scann = FALSE, nf = 2) > scatter.dudi(dat.acm) # here are two propositions: # first solution scatter.dudi(dat.acm,clab.row=0) # second solution s.arrow(dat.acm$c1, xax=1, yax=2) s.label(dat.acm$li, xax=1, yax=2, clabel=0,cpoint=1.5, add.p=T) add.scatter.eig(dat.acm$eig, dat.acm$nf, xax=1, yax=2, posi = "top", ratio = 1/4) regrads, Pierre -- Ce message a été envoyé depuis le webmail IMP (Internet Messaging Program) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] PCA biplot question
Hi, hi all, > Hi everyone, > I'd like to project two pcas onto one device window. > I plot my first PCA: > biplot(prcomp(t(cerebdevmat)), var.axes=FALSE, cex=c(1,.1), > pc.biplot=TRUE) > Now I'd like to project the features of another PCA onto this graph. > Any suggestions? You can used co-inertia analysis (coinertia in package ade4) or maybe procuste analysis (package vegan, ade4, shapes) these analyses are adapted to the simultaneous analyses of two tables. cheers, Pierre -- Ce message a été envoyé depuis le webmail IMP (Internet Messaging Program) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Ternary or Triangular Plots (soil texture triangle plot)?
hi, hi all you can use the function 'triangle.plot' of the library ade4. there are several example in the help (?triangle.plot). Pierre Selon Christos Hatzis <[EMAIL PROTECTED]>: > You might want to try 'ternaryplot' from the 'vcd' package. I haven't used > it myself but it appears to be quite flexible and since it is based on the > grid graphics system it is highly extensible. > > -Christos > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bolser > Sent: Monday, April 03, 2006 9:41 AM > To: r-help@stat.math.ethz.ch > Subject: [R] Ternary or Triangular Plots (soil texture triangle plot)? > > > Hi, > > I am trying to create a triangular plot to show the 'composition' of a set > of items with three variables (historically the percent sand, silt and clay > in soil). > > So far I have tried the 'soil texture triangle plot' in the package plotrix > and the 'ternary or triangular plots' in the package cwhtool (cwhmisc). Both > have strengths and weaknesses, but neither has a 'standard' or 'generic' > feel about it. > > To save myself time I would like to ask the list if there is a preferred or > standard implementation of the triangle plot that will let me, > > * Label the three axes > * Specify a range for the three axis > * Label each point with a string > * Add lines perpendicular to each axis > > Or in general if there is an implementation of the triangle plot which > supports the standard plotting options. > > Thanks very much for any pointers, > > Dan. > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > -- Ce message a été envoyé depuis le webmail IMP (Internet Messaging Program) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] read file of EXCEL format
hi, hi all, there are several possibilities to import data in Excel format. you can use the fonctions "odbcConnectExcel","read.xls", ... (see http://cran.r-project.org/doc/manuals/R-data.html) require(RODBC) ?odbcConnect library(gdata) ?read.xls regards, P.BADY Selon XinMeng <[EMAIL PROTECTED]>: > > Hello sir: > > How can I read data file of EXCEL format from disk("d:\\data.XLS" for > example)? > > I can only read data file of .txt format > read.delim("d:\\data.txt",header=T,as.is=T),but only EXCEL format is > available at present. > > > Thanks a lot > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > -- Ce message a été envoyé depuis le webmail IMP (Internet Messaging Program) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Multinomial Nested Logit package in R?
hi, hi all, you can consult this link : http://tolstoy.newcastle.edu.au/R/help/05/11/15455.html hope this help, cheers, P.BADY Selon "David C. James" <[EMAIL PROTECTED]>: > Dear R-Help, > > I'm hoping to find a Multinomial Nested Logit package in R. It would > be great to find something analogous to "PROC MDC" in SAS: > > The MDC (Multinomial Discrete Choice) procedure analyzes models > > where the > > choice set consists of multiple alternatives. This procedure > > supports conditional logit, > > mixed logit, heteroscedastic extreme value, nested logit, and > > multinomial probit mod- > > els. The MDC procedure uses the maximum likelihood (ML) or > > simulated maximum > > likelihood method for model estimation. Since the term multinomial > > logit is often > > used instead of conditional logit in econometrics literature, the > > term simple multino- > > mial logit is used here to denote the model used by Schmidt and > > Strauss (1975), while > > multinomial logit is used as a synonym of conditional logit. > > I found this web site useful in comparing various categorical > dependent variable models, but it only addresses SAS, STATA, LIMDEP, > and SPSS: > http://www.indiana.edu/~statmath/stat/all/cdvm/cdvm1.html > > I have searched using: > 1. Google> site:r-project multinomial nested logit > 2. Google> site:r-project.org multinomial discrete choice > 3. R> help.search("multinomial nested logit") > No help files found matching multinomial nested logit using fuzzy > matching > 4. R> help.search("multinomial discrete choice") > No help files found matching multinomial discrete choice using > fuzzy matching > > Possibilities that seem unclear and/or not very promising: > 1. It is my understanding that the multinom function in the nnet > package does NOT do nested models. > 2. The MNP (multinomial probit) package is close, but I want a logit, > not probit, model. > 3. http://www.r-project.org/nocvs/mail/r-help/2002/4394.html > On Wed, 29 May 2002, Vumani Dlamini wrote: > > > Has anyone implemented the conditional logit and/or the nested > > logit model > > > in R? > > > > Conditional logistic regression is clogit() in the survival package. > But the survival package didn't seem to have what I needed. Am I > overlooking anything? > > Are there any synonyms that I should be using for the search? I > would appreciate any pointers or suggestions. > > Thanks, > -David > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Help to multinomial analyses
hi, hi all, > Dear Sirs, > Could you please be so kind as to send us some information on residuals in > multinomial logistic models? here are some references to multinomial models: Agresti A.(1996) An Introduction to Categorical Data Analysis Agresti A. (2002) Categorical Data Analysis, 2nd Edition McCullagh P. and Nelder J. (1989). Generalized Linear Models. Chapman and Hall, London. http://data.princeton.edu/wws509/notes/c6.pdf http://www.statslab.cam.ac.uk/~pat/Splusdiscrete2.pdf (see chapter 11 for Multinomial response) etc ... > Is it possible to use R software? You can consult these links : http://www.stat.ufl.edu/~aa/cda/software.html http://www.statslab.cam.ac.uk/~pat/Splusdiscrete2.pdf (see chapter 11 for Multinomial response) cheers, P.BADY __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Compare two distance matrices
hi, > but I don't see why you would need an extra package "ade4" and > its "extra - function" mat2dist(). > when the 'stats' package already provides the function > as.dist(.) {the help page of which was mentioned by the > original poster}. it's just a matter of habit and it's just a proposition. I prefer use mat2dist, its MY choice. the world is cruel for one problem, there are very often several solutions :( I'm sorry :) P.BADY __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Compare two distance matrices
Hi, hi all, > I am trying to compare two distance matrices with R. I would like to > create a XY plot of these matrices and do some linear regression on > it. But, I am a bit new to R, so i have a few questions (I searched in > the documentation with no success). > The first problem is loading a distance matrix into R. This matrix is > the output of a the Phylip program Protdist and lookes like this: > I tried with the scan() function to load the files, but with no > success. How should i load in these files? > you can separately load each matrix with two text files. require(ade4) mat1 <- read.table("mat1.txt") nam1 <- mat1[,1] mat1 <- mat1[,-1] row.names(mat1) <- names(mat1) <- nam1 mat2 <- read.table("mat2.txt") nam2 <- mat2[,1] mat2 <- mat2[,-1] row.names(mat2) <- names(mat2) <- nam2 dist1 <- mat2dist(mat1) dist2 <- mat2dist(mat2) # with mat1: # n_crassa0.00 0.690737 0.895257 0.882576 2.365386 # c_neufor0.690737 0.00 0.956910 0.979988 2.103041 # a_thaliana 0.895257 0.956910 0.00 1.003668 2.724847 # pompep 0.882576 0.979988 1.003668 0.00 2.065202 # s_cerevis 2.365386 2.103041 2.724847 2.065202 0.00 # and mat2: # n_crassa0.00 0.739560 0.933986 0.861644 2.207467 # c_neufor0.739560 0.00 0.988779 0.925168 1.941141 # a_thaliana 0.933986 0.988779 0.00 1.007803 2.415320 # pompep 0.861644 0.925168 1.007803 0.00 2.394490 # s_cerevis 2.207467 1.941141 2.415320 2.394490 0.00 I think that its the more simple solution, NOT the optimal solution. Maybe, there is an interface to read Phylip file in Bioconductor project(?). To transform matrix to dist, you can use the function mat2dist of the library ade4 (see example) To compare 2 distances matrices, there are many possibility ! For example, if the distances matrices are Euclidian, you can used directly principal coordinate analyses (dudi.pco), and co-inertia analysis or procuste analysis,etc ... # examples: # Data preparation require(ade4) mat1 <- read.table("mat1.txt") nam1 <- mat1[,1] mat1 <- mat1[,-1] row.names(mat1) <- names(mat1) <- nam1 mat2 <- read.table("mat2.txt") nam2 <- mat2[,1] mat2 <- mat2[,-1] row.names(mat2) <- names(mat2) <- nam2 ? mat2dist dist1 <- mat2dist(mat1) dist2 <- mat2dist(mat2) dist1 dist2 is.euclid(dist1) is.euclid(dist2) # cool the distances matrices are euclidian :) # to compare the 2 matrices # example 1 : mantel test ? mantel.randtest mt1 <- mantel.randtest(dist1,dist2,nrepet=10) plot(mt1) # Example 2: coefficient of vectorial correlation (Escoufier, 1973) ? RVdist.randtest RV1 <- RVdist.randtest(dist1,dist2,nrepet=10) plot(RV1) # Example 3: coinertia analysis ?dudi.pco # ?cmdscale ?coinertia ?randtest.coinertia pco1 <- dudi.pco(dist1,nf=3,scannf=F) pco2 <- dudi.pco(dist2,nf=3,scannf=F) co1 <- coinertia(pco1,pco2,nf=3,scannf=F) plot(co1) testco1 <-randtest.coinertia(co1,nrepet=10) plot(testco1) # Example 4: procuste analysis ? procuste ? procuste.randtest pco1 <- dudi.pco(dist1,nf=3,scannf=F) pco2 <- dudi.pco(dist2,nf=3,scannf=F) proc1 <- procuste(pco1$tab,pco2$tab) plot(proc1) testproc1 <-procuste.randtest(pco1$tab,pco2$tab,nrepet=10) plot(testproc1) the choice depend to your outcome. hopes this help P.BADY __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Mental Block with PCA of multivariate time series!
hi all ... again I'm sorry ... my answer doesn't deal with the subject. off-topic ;( Pierre At 10:33 16/05/2005 +0100, Laura Quinn wrote: >Sorry, I don't think I made myself clear enough with my initial query! > >I am wishing to investigate the temporal evolution of the pca: if we >assume that every 50 rows of my data frame is representitive of, for >instance, 1 day of data, I am hoping to automate a process whereby a pca >is performed on every 50 rows of data and the loading for PC1 and PC2 for >each variable (i.e. each column) is represented as a point on a plot - so >a years' data will be represented as two lines (representing PC1 and PC2) >on a time series plot for each variable. > > > >Laura Quinn >Institute of Atmospheric Science >School of Earth and Environment >University of Leeds >Leeds >LS2 9JT > >tel: +44 113 343 1596 >fax: +44 113 343 6716 >mail: [EMAIL PROTECTED] > >On Mon, 16 May 2005, Gavin Simpson wrote: > > > Laura Quinn wrote: > > > Please could someone point me in the right direction as I appear to be > > > having a total mental block with fairly basic PCA problem! > > > > > > I have a large dataframe where rows represent independent > > > observations and columns are variables. I am wanting to perform PCA > > > sequentially on blocks of nrows at a time and produce a graphical output > > > of the loadings for the first 2 EOFs for each variable. > > > > > > I'm sure I've performed a very similar routine in the past, but the > method > > > is currently escaping me. > > > > > > Any help gratefully received! > > > > Hi Laura, > > > > data(iris) > > iris.dat <- iris[,1:4] > > pca.1 <- prcomp(iris.dat[1:50, ], scale = TRUE) > > pca.2 <- prcomp(iris.dat[51:100, ], scale = TRUE) > > pca.3 <- prcomp(iris.dat[100:150, ], scale = TRUE) > > > > biplot(pca.1) > > etc... > > > > There is a better way of subsetting this data set as the 5th col of iris > > is a factor and we could use the subset argument to prcomp to do the > > subsetting without having to know that there are 50 rows per species. > > Take a look at that argument if you have a variable that defines the > > blocks for you. > > > > Is this what you were after? > > > > All the best, > > > > Gav > > -- > > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > > Gavin Simpson [T] +44 (0)20 7679 5522 > > ENSIS Research Fellow [F] +44 (0)20 7679 7565 > > ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk > > UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ > > 26 Bedford Way[W] http://www.ucl.ac.uk/~ucfagls/ > > London. WC1H 0AP. > > %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% > > > >__ >R-help@stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://pierre.bady.free.fr (in construction) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Mental Block with PCA of multivariate time series!
Hi all, You can use the sepan function in the library ade4. Maybe it's a bit difficult but it provides interesting perspectives. This function uses arguments 'ktab' (K-table) which correspond to a list of data frames with the same row.names in common. ?ktab # example : two propoistions data(meaudret) # table mil <- meaudret$mil # description of the block plandat <- as.factor(meaudret$plan$dat) #--- # first proposition: #--- # Ktab preparation list1 <- NULL for(i in 1:nlevels(plandat)){ list1[[i]] <- dudi.pca(meaudret$mil[plandat==levels(plandat)[i],],center=T,scale=T,scannf=F,nf=2) } ktab1 <- ktab.list.dudi(list1) # sequential analyses sepan1 <- sepan(ktab1) # graphical representations plot(sepan1) kplot(sepan1) # # second proposition: more difficult but more interesting :) # # within analysis ?within.pca wit1 <- within.pca(meaudret$mil, meaudret$plan$dat, scan = FALSE, scal = "partial") # Ktab preparation kta1 <- ktab.within(wit1, colnames = rep(c("S1","S2","S3","S4","S5"), 4)) kta2 <- t(kta1) # sequential analyses sepan2 <- sepan(kta2) # graphical representations plot(sepan2) kplot(sepan2) You can conclude your analysis with specific K-table analyses (e.g. STATIS, MFA, MCOA, GPA). ... it's very funny methods :) hopes this help Pierre At 08:32 16/05/2005 +0100, Laura Quinn wrote: >Please could someone point me in the right direction as I appear to be >having a total mental block with fairly basic PCA problem! > >I have a large dataframe where rows represent independent >observations and columns are variables. I am wanting to perform PCA >sequentially on blocks of nrows at a time and produce a graphical output >of the loadings for the first 2 EOFs for each variable. > >I'm sure I've performed a very similar routine in the past, but the method >is currently escaping me. > >Any help gratefully received! > >Laura Quinn >Institute of Atmospheric Science >School of Earth and Environment >University of Leeds >Leeds >LS2 9JT > >tel: +44 113 343 1596 >fax: +44 113 343 6716 >mail: [EMAIL PROTECTED] > >__ >R-help@stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://pierre.bady.free.fr (in construction) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Factor Analysis functions...
hi all, In the library ade4, there are two eigenanalysis which enable the ordination of the categorical variables. 1- Multiple Correspondence Analysis (MCA, Tenenhaus & Young 1985) performs the multiple correspondence analysis of a factor table (see the function dudi.acm). this function is equivalent to functions mca of the library(MASS) 2- the mixed factorial analysis (Hill & Smith 1976) enables the ordination of tables mixing quantitative variables and factors (functions dudi.mix or dudi.hillsmith). I hope this helps, P.BADY At 15:47 21/04/2005 -0500, Chris Bergstresser wrote: >Hi all -- > > I'm running a Factor Analysis on my dataset, and I've located the > "factanal()" and "princomp()" methods. I don't want to do a PCA, so it > looks like I should use factanal(), but factanal() requires specifying > the number of factors you expect from the analysis. >Are there any packages out there explicitly for Exploratory Factor > Analysis that do not require specifying the number of expected factors? > >-- Chris > >__ >R-help@stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr http://pierre.bady.free.fr (in construction) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] analyse des correspondances multiples
hi all, You can use the functions mca of the library(MASS) and dudi.acm of the library(ade4). these two functions are equivalent. # exemple 1 require(MASS) data(farms) ?mca #analysis mca1 <- mca(farms,nf=4) mca1 # singular values mca1$d # eigenvalues (mca1$d)^2 # graphic plot(mca1) # example 2 require(ade4) ?dudi.acm #analysis mca2 <- dudi.acm(farms,nf=4, scannf=F) mca2 # singular values sqrt(mca2$eig[1:4]) # eigenvalues mca2$eig[1:4] #graphic x11() scatter(mca2) hope this help ;') P.BADY At 14:07 07/04/2005 +0200, Faouzi LYAZRHI wrote: >bonjour, >Je voudrais faire une analyse des correspondances multiples avec R. avec >les représentation graphiques correspondantes avec R. >je ne sais pas comment procéder .. >en vour remerciant par avance >Faouzi > >__ >R-help@stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr http://pierre.bady.free.fr (in construction) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Concatenate vector into string
Hi all, ted <- letters[1:3] ted paste(ted, collapse = "") cheers, P.BADY At 03:32 04/03/2005 -0800, Matthieu Cornec wrote: >Hello, > >I would like to convert c("a","b","c") into "abc". >Anyone could help? >Thanks, > >Matthieu Cornec > >__ >R-help@stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr http://pierre.bady.free.fr (in construction) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] questions sur R
Hi, you can see this link: http://www.kb.u-psud.fr/kb/acces-etudiant/cours/biostat/html/Syntaxe%20et%20listings%20CUSSV/html/glm.htm The R functions (ex. glm, polr) were compared to the SAS procédures (ex. proc logistic, genmod). perhaps the solution of your problem is here. P.BADY At 10:51 07/02/2005 +0100, nathalie bouez wrote: >bonjour, > >Je suis actuellement en derniere annee d'ecole d'ingenieur en informatique >et statistiques et je dois réaliser mon projet de fin d'études sur le >logiciel R. >En fait, je dois réaliser un scoring sous R puis le meme sous SAS et >comparer les resultats. Mon fichier se prete à une regression logistique. >J'ai donc utilisé la fonction glm sous R et Catmod sous SAS seumement, je >ne parviens pas au meme resultats, les estimateurs different d'une methode >a l'autre. Avez vous une idee d'ou peut provenir cette difference? >Je vous remercie d'avance > >Cordialement, > > > >- > >mails ! > > [[alternative HTML version deleted]] > >__ >R-help@stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr http://pierre.bady.free.fr (in construction) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to make the matrix as factors
Hi, The argument df of the function mca requires only a data.frame (not matrix) containing only factors. # Example: ?data.frame library(MASS) ?mca # we construct the matrix. size <- c(3,2,3,3,3,3,3,3,3) texture <- c(2,3,2,2,2,2,2,2,2) leaf <- cbind(size,texture) new.mca <- mca(leaf) # Error in mca(leaf) : All variables must be factors # now, we construct a data.frame. dleaf <- as.data.frame(leaf) summary(dleaf) # we transform each variable into a factor. dleaf[,2] <- as.factor(dleaf[,2]) dleaf[,1] <- as.factor(dleaf[,1]) summary(dleaf) new.mca <- mca(dleaf) new.mca # cheers, P.BADY En réponse à [EMAIL PROTECTED]: > Hi All, > > Thanks for you help, I have loaded the library MASS to call the mca. But > wen I > want to do the mca, there is another problem, for example > > > > leaf <- read.table("C:/Documents and Settings/wxh-c/×ÀÃæ/1.txt", > + col.names=c("size","texture"),header=TRUE) > > leaf > size texture > 1 3 3 > 2 2 2 > 3 3 2 > 4 3 2 > 5 3 2 > 6 3 3 > 7 3 2 > 8 3 2 > 9 3 2 > > attach(leaf) > > require(MASS) > Loading required package: MASS > [1] TRUE > > new.mca <- mca(leaf) > Error in mca(leaf) : All variables must be factors > - > So, what should I do to make the matrix as factor. Waiting for you > answers. > Thanks! > > jeff > > __ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > - 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] How about a mascot for R?
why the marmot, would you tell us? simply, because, when a marmot sleeps (6 months a year), the only sounds that you can hear is. RRR RRR RRR... P. Bady & Y. Reyjol :-) At 20:41 02/12/2004 +0100, Pierre BADY wrote: >Hi all, > >The person next to me at desk thinks that marmot (Marmota marmota) is maybe >more appropriate ...;o)) > >Take a look at: >http://images.google.fr/images?q=marmot+&hl=fr&btnG=Recherche+Google > >otherwise Rooster ("R Object Oriented STatistics EnviRonment") is very funny ! > >hope this hekp ... ;o)) > > >P.BADY and Y. REYJOL > > > > > > >At 18:22 02/12/2004 +, Patrick Burns wrote: > >Or a furry and cuddly raccoon? > > > >Peter Dalgaard wrote: > > > >>Damian Betebenner <[EMAIL PROTECTED]> writes: > >> > >> > >> > >>>R users, > >>> > >>>How come R doesn't have a mascot? Linux has one and so does LaTeX, so > >>>shouldn't R? I personally think that associating a "friendly face" with > >>>R would be a good thing for R (one letter names can be quite > intimidating). > >>> > >>>I apologize if this is addressed in the FAQ. I searched the FAQ as well > >>>as the mailing list archives and checked > >>> > >>>?mascot > >>> > >>>but to no avail. ;-) > >>> > >> > >>A furry and cuddly inchworm? > >> > > > >__ > >[EMAIL PROTECTED] mailing list > >https://stat.ethz.ch/mailman/listinfo/r-help > >PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >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 : [EMAIL PROTECTED] >http://limnologie.univ-lyon1.fr > [[alternative HTML version deleted]] > >__ >[EMAIL PROTECTED] mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] How about a mascot for R?
Hi all, The person next to me at desk thinks that marmot (Marmota marmota) is maybe more appropriate ...;o)) Take a look at: http://images.google.fr/images?q=marmot+&hl=fr&btnG=Recherche+Google otherwise Rooster ("R Object Oriented STatistics EnviRonment") is very funny ! hope this hekp ... ;o)) P.BADY and Y. REYJOL At 18:22 02/12/2004 +, Patrick Burns wrote: >Or a furry and cuddly raccoon? > >Peter Dalgaard wrote: > >>Damian Betebenner <[EMAIL PROTECTED]> writes: >> >> >> >>>R users, >>> >>>How come R doesn't have a mascot? Linux has one and so does LaTeX, so >>>shouldn't R? I personally think that associating a "friendly face" with >>>R would be a good thing for R (one letter names can be quite intimidating). >>> >>>I apologize if this is addressed in the FAQ. I searched the FAQ as well >>>as the mailing list archives and checked >>> >>>?mascot >>> >>>but to no avail. ;-) >>> >> >>A furry and cuddly inchworm? >> > >__ >[EMAIL PROTECTED] mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] graphics site
hi, you can see these links: http://pbil.univ-lyon1.fr/R/enseignement.html http://zoonek2.free.fr/UNIX/48_R/all.html http://www.ceremade.dauphine.fr/~xian/Noise.html http://statwww.epfl.ch/davison/teaching/ProbStat/20032004/PDF http://www.ulb.ac.be/di/map/gbonte/mod_stoch perhaps the site you a looking for is here ... ;o)) hope this helps P.BADY At 09:24 05/11/2004 -0600, Michaell Taylor wrote: >About six months ago there was a reference to a site (in french) that >did a spectacular job of demonstrating R's graphical capabilities. > >My bookmarks were recently wiped and I cannot find this site despite my >best googling. > >Anyone have the address which I have done a miserable job describing? > >Thanks. > >Michaell > >__ >[EMAIL PROTECTED] mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] biplot drawing conc ellipses
Hi all, you can see in the library(ade4). there is a nice graphical function called ‘s.class’. Example for a principal components analysis: ?s.class data(meaudret) pca1 <- dudi.pca(meaudret$mil, scan = FALSE, nf = 4) # plot row coordinates s.class(pca1$li, meaudret$plan$dat, sub = "Principal Component Analysis",add. p=F,col=c(1,2,3,4),cstar=0) # add principal axes s.arrow(pca1$c1,clabel=0.7,add.p=T) # “… 'scatter.dudi' is a factorial map of individuals and the # projection of the vectors of the canonical basis multiplied by a # constante of rescaling. …” ?scatter.dudi scatter.dudi(pca1,clab.row=0) s.class(pca1$li, meaudret$plan$dat, sub = "Principal Component Analysis",add. p=T,col=c(1,2,3,4), cstar=0) hope this helps, P.BADY Quoting "T. Murlidharan Nair" <[EMAIL PROTECTED]>: > Is there an option to draw concentration ellipses in biplots ? It > seems > really nice to summarize large number of points of each group. > > Cheers../ Murli > > __ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > - 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] an introduction to R in french
hi, you can see these links: http://pbil.univ-lyon1.fr/R/enseignement.html http://zoonek2.free.fr/UNIX/48_R/all.html http://www.ceremade.dauphine.fr/~xian/Noise.html http://cran.univ-lyon1.fr/doc/contrib/rdebuts_fr.pdf (it's still up-to-date) hope this helps P.BADY At 18:40 21/10/2004 +0200, Romain François wrote: >Hello wizaRds ! > >I am looking for a french and recent version of "An introduction to R". >Does anybody know where i could find on of these. > >Thanks. > >-- >Romain François >25, avenue Guy Moquet >94 400 Vitry sur seine >FRANCE >___ >___ > >[EMAIL PROTECTED] >01 46 80 65 60 >06 18 39 14 69 > >__ >[EMAIL PROTECTED] mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] multinomial logistic regression
hi all, you could have look at the library(VGAM). http://www.stat.auckland.ac.nz/~yee/VGAM/ hope this helps P.BADY At 17:36 22/09/2004 -0700, array chip wrote: >Hi, how can I do multinomial logistic regression in R? >I think glm() can only handle binary response >variable, and polr() can only handle ordinal response >variable. how to do logistic regression with >multinomial response variable? > >Thanks > > > >__ > >Y! Messenger - Communicate in real time. Download now. > >__ >[EMAIL PROTECTED] mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] how to plot an array with labels
Hello to all, There are several functions to perform scatter diagrams with labels in the library 'ade4'. # library(ade4) bob <- as.data.frame((array(1:5, c(4,2 row.names(bob) row.names(bob) <- paste("row",1:4,sep=".") row.names(bob) par(mfrow=c(1,2)) s.label(bob, sub="row.names",grid=F) newnames <- paste("newrow",1:4,sep=".") newnames s.label(bob,label=newnames,sub="new names",grid=F) # There are more examples in the help. ? s.label hope this helps P.BADY Quoting luc <[EMAIL PROTECTED]>: > How can i plot an array and instead of having on the x labels the > indexes of the array I want to display an other String array of the > same length > > __ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > - 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] factor analysis
hi all, In the library ade4, there are two eigenanalysis which enable the ordination of the categorical variables. 1- Multiple Correspondence Analysis (MCA, Tenenhaus & Young 1985) performs the multiple correspondence analysis of a factor table (see the function dudi.acm). 2- the mixed factorial analysis (Hill & Smith 1976) enables the ordination of tables mixing quantitative variables and factors (functions dudi.mix or dudi.hillsmith). I hope this helps, P.BADY En réponse à John Fox <[EMAIL PROTECTED]>: > Dear Allan, > > I assume that the categorical data are ordinal. There are methods for > factor analyzing ordinal data (e.g., using polychoric correlations) > and > mixed ordinal and interval data, but as far as I know, these aren't > implemented in R. > > John > > On Thu, 13 May 2004 18:32:11 +0200 > allan clark <[EMAIL PROTECTED]> wrote: > > hi all > > > > this is a stats question. > > > > when undertaking factor analysis should the variables included > always > > be > > continiuos random variables? could one include categorical data? e.g > > some survey type data > > > > my gut feeling is that one should not include categorical type data > > since factor analysis is based on the eigenanalysis of the > > correlation > > matrix of a group of variables. The introduction of categorical data > > into a data set might "mess up" the corelation matrix. > > > > __ > > [EMAIL PROTECTED] mailing list > > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > > http://www.R-project.org/posting-guide.html > > > > John Fox > Department of Sociology > McMaster University > Hamilton, Ontario, Canada > http://socserv.mcmaster.ca/jfox/ > > __ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > - 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 : [EMAIL PROTECTED] http://limnologie.univ-lyon1.fr http://badgloup.ifrance.com __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html