# multiSAR

### Description

multi-model averaging (of non-linear SAR models) and non parametric confidence intervals calculation.

### Usage

1 |

### Arguments

`modelList` |
Vector of character string with the names of the models to fit. |

`data` |
An mmSAR data object (a list with two elements : $name (a character sting with the name of the data set) and $data (a data.frame with 2 columns : area and richness ) ). |

`nBoot` |
The number of bootstrap resamples for the construction of the non parametric confidence interval. |

`crit` |
One of "Bayes" (for a comparison of the models based on the Bayesian Information Criterion -BIC-) or "Info" (for a comparison of the models based on the Akaike Information Criterion (AIC) -note that the function will switch automatically between AIC and it's "small sample corrected version, AICc" depending on the size of the data set- ). |

`norTest` |
The name of the test for the normality of the residuals, one of "lillie" (for a Lilliefors (Kolmogorov-Smirnov) test for the composite hypothesis of normality) or "shapiro" (for a Shapiro-Wilk test of normality). |

`verb` |
A boolean stipulating if the function should report informations while running. |

### Details

multiSAR is the model averaging function : fitting of SAR models is performed by calling the function `rssoptim`

, model selection is performed using the criterion specified in argument (argument "crit"), multi-model averaging is realised for valid SAR models (see `rssoptim`

for a description of the test performed on the fits, finally a non-parametric confidence interval is obtained using a bootstraping procedure (the argument "nBoot" give the number of bootstrap resamples, see Davison & Hinkley (1997) for an overview of bootstrap methds and their applications in regression). More details about the multimodel SAR methodology can be found in Guilhaumon et al. (2008) and the companion paper of this package (Guilhaumon et al., 2010).

### Value

A list with the following elements :

data : the mmSAR data object passed to the function (a list with two elements : $name (a character sting with the name of the data set) and $data (a data.frame with 2 columns : area and richness ) )

models : Vector of character string with the names of the models

optimRes : a matrix with the informations about the fit of the models (self explanatory).

filtOptimRes : a matrix with the informations about the fit of the models which satisfied the regression hypotheses.

calculated : a matrix of species richness infered from each of the SAR models.

filtCalculated : a matrix of species richness infered from each of the valid SAR models.

averaged : the vector of multimodel averaged species richness.

DeltaIC : a vector containing for each valid model the AIC (AICc) or BIC differences.

akaikeweight : a vector containing the Aikaike weights for each valid model.

avResiduals : a vector of residuals for the multimodel SAR.

shapAvRes : the result of a "shapiro.test" on the vector of residuals for the multimodel SAR.

corAvRes : the result of a "cor.test" betwwen the vector of residuals for the multimodel SAR and areas in the dataset.

bootSort : a matrix with "nBoot" rows containing the SORTED species richness from the mulimodel SAR. It is used for the calculation of the confidence interval using the percentil method.

bootHat : a matrix with "nBoot" rows containing the species richness from the mulimodel SAR.

bootMatrix : a matrix with "nBoot" rows containing the bootstrap resamples.

IC : the information criterion used for model selection.

### References

Davison AC, Hinkley DV. 1997. Bootstrap Methods and Their Application (Cambridge Univ Press, Cambridge, UK).

Guilhaumon F. et al. 2008. Taxonomic and regional uncertainty in species-area relationships and the identification of richness hotspots. – Proc Natl Acad Sci USA 105:15458-15463.

Guilhaumon, F., Mouillot, D. and Gimenez, O. 2010. mmSAR : an R-package for multimodel species-area relationship inference (http://mmsar.r-forge.r-project.org) Ecography XX: XXX–XXX.

### See Also

`rssoptim`

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
## Not run:
#loading all available models
data(power);data(expo);data(negexpo);data(monod);data(ratio);data(logist);data(lomolino);data(weibull)
#loading the Galapagos Islands plants data set
data(data.galap)
#creating a vector of model names
mods <- c("power","expo","negexpo","monod","logist","ratio","lomolino","weibull")
#fitting all the models to the Galapagos dataset and perform multimodel averaging
resAverage <- multiSAR(modelList=mods,data.galap)
## End(Not run)
``` |