# Re: [MORPHMET] determining if groups of specimens are statistically distinct.

```Ian,
```
```

The command summary(manova(..)) will perform a parametric manova. However,
for the datafile you sent, that operation will not be possible because the
number of variables relative to sample size (note, you posted a similar
issue about a month ago to Morphmet).

The alternative is to use permutation-based evaluation of group
differences. Permutation-based manova can be performed in numerous
R-packages, including geomorph and RRPP.  These two packages also have the
ability to perform pairwise comparisons using the permutation regime
specified.

Example R-code for implementing both is found below (NOTE: I strongly
suggest you read the help files and their examples to better understand the
options for these functions: there are many).

Best,

Dean

##

mydat <- read.csv('PCWIDE1.txt', header = TRUE,sep = '\t')

spec <- as.factor(mydat[,1])

shape <- as.matrix(mydat[,-1])

summary(manova(shape~spec))  #wonâ€™t work.  df issue related to N vs. P

library(geomorph)

gdf<-geomorph.data.frame(spec=spec,shape=shape)

procD.lm(shape~spec,data=gdf)

advanced.procD.lm(shape~spec,f2 = ~1, group = ~spec, data=gdf)

library(RRPP)

rdf<-rrpp.data.frame(spec=spec,shape=shape)

res <- lm.rrpp(shape~spec,data=rdf)

res.null<- lm.rrpp(shape~1,data=rdf)

anova(res)

PW <- pairwise(fit=res, groups = spec)

summary(PW)

On Thu, Oct 4, 2018 at 2:06 PM Ian <ijames...@gmail.com> wrote:

> I am trying to determine if three groups are statistically distinct from
> one another. As is my script produces P values for each x and y coordinate
> but i am unsure how to get a comparison between the groups as a whole. My
> script and example data are attached. Can anyone tell me how i would go
> about determine if the groups Rafalt, Rafnas, and Rafpon are statistically
> distinct? I have tried to make subsets to do a pairwise comparison but that
> has not been successful. Any input is much appreciated.
>
>
> data1<-PCWIDE1
>
> names(data1)
>
> Raf.manova1<-
> manova(cbind(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6,x7,y7,x8,y8,x9,y9,x10,y10,x11,y11,x12,y12,x13,y13,x14,y14,x15,y15,x16,y16,x17,y17,x18,y18,x20,y20,x21,y21,x22,y22,x23,y23,x24,y24,x25,y25,x26,y26,x27,y27,x28,y28,x29,y29,x30,y30,x31,y31)~
> as.factor(Species),data=data1)
>
> SAV<-summary.aov(Raf.manova1)
>
> print(SAV)
>
> --
> MORPHMET may be accessed via its webpage at http://www.morphometrics.org
> ---
> You received this message because you are subscribed to the Google Groups
> "MORPHMET" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to morphmet+unsubscr...@morphometrics.org.
>

--

Dr. Dean C. Adams

Director of Graduate Education, EEB Program

Professor

Department of Ecology, Evolution, and Organismal Biology

Iowa State University

--
MORPHMET may be accessed via its webpage at http://www.morphometrics.org
---
You received this message because you are subscribed to the Google Groups
"MORPHMET" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to morphmet+unsubscr...@morphometrics.org.
```