size_null_model: Size Ratio

Description Usage Arguments Examples

View source: R/sizeratio_null.R

Description

Create a Size Ratio null model

Usage

1
2
3
size_null_model(speciesData, algo = "size_uniform", metric = "var_ratio",
  nReps = 1000, saveSeed = FALSE, algoOpts = list(),
  metricOpts = list(), suppressProg = FALSE)

Arguments

speciesData

a data vector in which each entry is the measured trait (such as body size or flowering date) for each species in the assemblage.

algo

the algorithm to use, must be "size_uniform", "size_uniform_user", "size_source_pool", "size_gamma".

metric

the metric used to caluclate the null model: choices are "min_diff", "min_ratio", "var_diff", "var_ratio"; default is "var_ratio".

nReps

the number of replicate null assemblages to create; default is 1000 replicates.

saveSeed

TRUE or FALSE. If TRUE the current seed is saved so the simulation can be repeated; default is FALSE.

algoOpts

a list containing all the options for the specific algorithm you want to use. Must match the algorithm given in the 'algo' argument.

metricOpts

a list containing all the options for the specific metric you want to use. Must match the metric given in the 'metric' argument.

suppressProg

TRUE or FALSE. If true, display of the progress bar in the console is suppressed; default is FALSE. This setting is useful for creating markdown documents with 'knitr'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
## Run the null model
rodentMod <- size_null_model(dataRodents)
## Summary and plot info
summary(rodentMod)
plot(rodentMod,type="hist")
plot(rodentMod,type="size")

##  Uniform Size model with user inputs
rodentMod2 <- size_null_model(dataRodents,algo="size_uniform_user",
algoOpts = list(userLow = 3,userHigh=15))
summary(rodentMod2)
plot(rodentMod2,type="hist")
plot(rodentMod2,type="size")

### Source pool model

rodentMod_sp <- size_null_model(dataRodents,algo="size_source_pool",
algoOpts = list(sourcePool = runif(dim(dataRodents)[1],1,15)))

summary(rodentMod_sp)
plot(rodentMod_sp,type="hist")
plot(rodentMod_sp,type="size")


## End(Not run)

EcoSimR documentation built on May 2, 2019, 7:26 a.m.