# autosimi: Autosimilarity curve of species community data In CommEcol: Community Ecology Analyses

## Description

Similarities among two subsamples, each one obtained randomly from the same community dataset. Curves are otained for all subsample sizes from 1 up to half the number of sample units in the dataset. Autosimilarity curves can be used to evaluate sample suficiency when sample size is expressed as number of sampling units such as traps or quadrats. This is particularly suitable when the study involves similarities or dissimilarities among samples such as agglomerative clustering, ordination, Mantel test.

## Usage

 `1` ```autosimi(comm, method="bray", binary=FALSE, log.transf=FALSE, simi=TRUE, permutations=50) ```

## Arguments

 `comm ` Dataframe or matrix with samples in rows and species in columns. `method ` Similarity index obtained from `vegdist`. Similarities are obtained simply as 1-dissimilarity. Accordingly, it only makes sense for indices bounded at 0-1. For indices not bounded at 0-1 (distances), use `simi=FALSE` to obtain autodissimilarity curves. `binary ` Should data be transformed to presence/absence? `log.transf ` Transformation `log(x+1)` before calculation of similarities (or dissimilarities) `simi ` Similarity or dissimilarity curve. `permutations ` Number of curves randomly calculated and from which the mean autosimilairty curve is obtained.

## Details

The function selects randomly and without replacement an even number of sampling units (n = 2,4,6, ...) from the total sampling units. Next, the first n/2 sampling units are pooled (summed) to create a subsample, and the other n/2 sampling units to create another subsample. If `binary=TRUE`, the two subsamples are transformed to presence/absence. If `log.transf=TRUE`, `log(x+1)` of each value is obtained. The similarity between the two subsamples is calculated and stored. The procedure is repeated for larger subsample sizes until half the size of the full dataset (or up to the integer quotient in the case of odd numbers of sample units). The procedure is then repeated for the requested number of curves. The output is the average curve. This function is a different implementation of the procedures described in Schneck & Melo (2010).

## Value

A dataframe containing subsample sizes and average similarity values.

## References

Cao, Y., D.P. Larsen & R.M. Hughes. 2001. Evaluating sampling sufficiency in fish assemblage surveys: a similarity-based approach. Canadian Jounal of Fisheries and Aquatic Sciences 58: 1782-1793.

Schneck, F. & A.S. Melo. 2010. Reliable sample sizes for estimating similarity among macroinvertebrate assemblages in tropical streams. Annales de Limnologie 46: 93-100.

Weinberg, S. 1978. Minimal area problem in invertebrate communities of Mediterranean rocky substrata. Marine Biology 49: 33-40.

`vegdist`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```x<-matrix(0,4,4) diag(x)<-1 x4<-rbind(x,x,x,x) x4 autosimi(x4, binary=TRUE) plot(autosimi(x4, binary=TRUE)) data(BCI) simi<-autosimi(BCI, binary=TRUE, permutations=5) simi plot(simi, ylim=c(0.5,1)) # maintain the plot window open for the next curve simi.log<-autosimi(BCI, binary=FALSE, log.transf=TRUE, permutations=5) points(simi.log, col="red") ```

### Example output

```Loading required package: vegan
This is vegan 2.5-4
[,1] [,2] [,3] [,4]
[1,]    1    0    0    0
[2,]    0    1    0    0
[3,]    0    0    1    0
[4,]    0    0    0    1
[5,]    1    0    0    0
[6,]    0    1    0    0
[7,]    0    0    1    0
[8,]    0    0    0    1
[9,]    1    0    0    0
[10,]    0    1    0    0
[11,]    0    0    1    0
[12,]    0    0    0    1
[13,]    1    0    0    0
[14,]    0    1    0    0
[15,]    0    0    1    0
[16,]    0    0    0    1
sample.size      bray
1           1 0.1600000
2           2 0.3700000
3           3 0.5220000
4           4 0.6619048
5           5 0.7720000
6           6 0.8447619
7           7 0.9200000
8           8 0.9771429
sample.size      bray
1            1 0.6685417
2            2 0.7692059
3            3 0.7992732
4            4 0.8275900
5            5 0.8479456
6            6 0.8570635
7            7 0.8809040
8            8 0.8892465
9            9 0.8799334
10          10 0.9050134
11          11 0.8989042
12          12 0.9020819
13          13 0.9015693
14          14 0.9028228
15          15 0.9210156
16          16 0.9007667
17          17 0.9114355
18          18 0.9136586
19          19 0.9118472
20          20 0.9085888
21          21 0.9031140
22          22 0.9100698
23          23 0.9124416
24          24 0.9198143
25          25 0.9146023
```

CommEcol documentation built on March 16, 2021, 9:07 a.m.