Thanks to all for responding. I believe that I have figured out the problem and would like to know if my assessment of the problem is correct.
First, Dylan - I looked over the article that you suggested and the R script from the article's appendix. I actually read this article sometime ago and forgotten that I had. This article along with others contributed to my realization of the utility of Gower's distance. The problem, however, is not my inability to calculate the distance matrix from a data matrix of mixed data types. I can do this. Although the R script provided for that paper will certainly be of use in future. So thanks for directing me to this script. Second, I read over the the paper suggested by Dr. Hamlin "CLARKE KR, SOMERFIELD PJ, GORLEY RN (2008) Exploratory null hypothesis testing for community data: similarity profiles and biota-environment linkage. J Exp Mar Biol Ecol 366, 56-69". Doing so made it clear as to what my problem was. I believe that it is not a R code problem, but rather a problem that Simprof analyses do not work on data that are mixed (e.g., numerical, and categorical). On page 59 of that paper, Clarke et al (2008) write: " The values in each row of the matrix (species) are permuted across all columns (samples), independently from row to row, and the similarity profile for samples recalculated" So this means that these permutations would cause the data type to vary within the same column, which for obvious reasons would create problems. I guess I had not picked up on this aspect of the Simprof procedure (i.e., the structure of the permutations) from the other materials that I read on Simprof. Someone please correct me if my interpretation of the problem is incorrect. Thanks again for everyone's time and input. On Sun, Jul 7, 2013 at 9:20 AM, Dylan Craven <dylan.cra...@aya.yale.edu>wrote: > Hi Basil, > > Sandra Pavoine has a nice R script for dealing with different data types > in the same analysis, which creates a dissimilarity matrix that can be > input directly into FD: http://goo.gl/C9jUM > > Dylan > > > On Sat, Jul 6, 2013 at 12:08 PM, Basil Iannone <bian...@uic.edu> wrote: > >> Dear Dr. Hamlim and other R Users, >> >> I apologize for not stating this in my prior email, but I am working in R, >> and I am using the "gowdis" function in the "FD" package and the "simprof" >> function in the "clustsig" package to do my analysis. I also tried >> calculating the Gower's distance matrix among my observations using >> "daisy" >> in the package "cluster" but I philosophically like the way that "gowdis" >> treats ordered/ordinal variables (i.e.,following Podani 1999's >> suggestions). Regardless of using "daisy" or "gowdis", I had the same >> problem. >> >> Thank you much for requesting these clarifications. >> >> >> On Sat, Jul 6, 2013 at 9:13 AM, halim10-fes <halim10-...@sust.edu> wrote: >> >> > Dear Basil, >> > >> > Are you using any R package for your Analysis? For e.g. >> > 'clustsig','PRIMER', >> > etc. If you are using 'PRIMER', you can alternatively try using >> 'clustsig' >> > and >> > let us know what happened. >> > >> > Waiting eagerly to hear from you and others. >> > >> > P.S. Have you read the following article? >> > >> > CLARKE KR, SOMERFIELD PJ, GORLEY RN (2008) Exploratory null hypothesis >> > testing for community data: similarity profiles and biota-environment >> > linkage. J Exp Mar Biol Ecol 366, 56-69 >> > >> > >> > Best, >> > >> > --------------- >> > Md. Abdul Halim >> > Assistant Professor >> > Department of Forestry and Environmental Science >> > Shahjalal University of Science and Technology,Sylhet-3114, >> > Bangladesh. >> > Cell: +8801714078386. >> > alt. e-mail: xo...@yahoo.com >> > >> > >> > >> > On Fri, 5 Jul 2013 18:37:33 -0500, Basil Iannone wrote >> > > Dear R users, >> > > >> > > I am trying to conduct a simprof analysis to determine if groups of >> > objects >> > > form statistically significant clusters. >> > > >> > > The variables that I am using are a mixture of categorical, ordered, >> > > and numerical. I am therefore using Gower's distance for this >> > > analysis. Below is the code with my commentary. >> > > >> > > ### Below specifies the columns of the larger dataframe to use to >> > calculate >> > > ### distances among the objects in my dataset >> > > >> > > Fv<-F[,8:31] >> > > >> > > ### I feed the function below into the code for conducting simprof >> > analyses >> > > to >> > > ### specify what distance measure to use, i.e., to what >> > "method.distance" >> > > is ### equal. >> > > >> > > G.Matrix <- function (Fv) FD::gowdis(Fv, ord = "metric") >> > > >> > > ### I then do the analysis. >> > > >> > > Fsp <- simprof(Fv, num.expected=1000, num.simulated=999, >> > > method.cluster="average", method.distance=G.Matrix, >> > > alpha = 0.01, silent=FALSE, increment=100) >> > > >> > > After that, I get the following error message: >> > > >> > > Error in FD::gowdis(Fv, ord = "metric") : >> > > x is not a dataframe or a numeric matrix >> > > >> > > So it appears that the data used in a simprof analysis has to be >> numeric >> > > >> > > (which mine is not). The code structure does work when I use a >> dataframe >> > > with purely numeric data. So my questions are: >> > > >> > > 1) Is there a way in R to run a Simprof analysis on data that is not >> > > all numerical? >> > > >> > > 2) If not, why? That is, why can't simprof analyses be done on >> > > non-numerical data. I read Clarke and Gorley's explanation in their >> > PRIMER >> > > manual of Simprof analyses and I was unclear from their description >> > > as to why Simprof analyses cannot be conducted on non-numerical data. >> > > >> > > Finally, any suggested readings on the topic would be greatly >> > appreciated. >> > > >> > > Thanks in advance for any assistance. >> > > >> > > Sincerely, >> > > >> > > -- >> > > Basil V. Iannone III >> > > University of Illinois at Chicago >> > > Department of Biological Sciences (MC 066) >> > > 845 W. Taylor St. >> > > Chicago, IL 60607-7060 >> > > Email: bian...@uic.edu >> > > Phone: 312-355-0987 >> > > Fax: 312-413-2435 >> > > http://www2.uic.edu/~bianno2 >> > > >> > > [[alternative HTML version deleted]] >> > > >> > > _______________________________________________ >> > > R-sig-ecology mailing list >> > > R-sig-ecology@r-project.org >> > > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology >> > > >> > > -- >> > > This message has been scanned for viruses and >> > > dangerous content by MailScanner, and is >> > > believed to be clean. >> > >> > >> > >> > >> > -- >> > This message has been scanned for viruses and >> > dangerous content by MailScanner, and is >> > believed to be clean. >> > >> > >> >> >> -- >> Basil V. Iannone III >> University of Illinois at Chicago >> Department of Biological Sciences (MC 066) >> 845 W. Taylor St. >> Chicago, IL 60607-7060 >> Email: bian...@uic.edu >> Phone: 312-355-0987 >> Fax: 312-413-2435 >> http://www2.uic.edu/~bianno2 >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> R-sig-ecology mailing list >> R-sig-ecology@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology >> > > > > -- > Dylan J. Craven, M.F.S., Ph.D. > Post-Doctoral Fellow > Universite du Quebec a Montreal > > E-mail: dylan.cra...@aya.yale.edu > Personal Website: dylancraven.weebly.com > Skype: elgringacho > -- Basil V. Iannone III University of Illinois at Chicago Department of Biological Sciences (MC 066) 845 W. Taylor St. Chicago, IL 60607-7060 Email: bian...@uic.edu Phone: 312-355-0987 Fax: 312-413-2435 http://www2.uic.edu/~bianno2 [[alternative HTML version deleted]] _______________________________________________ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology