A little nullmodel function to check, if the observed values actually are much different to what one would expect under random numbers given the observed row and column totals (i.e.~information in the structure of the web, not only in its species' abundances). Random matrices are based on the function r2dtable
. The test itself is a ttest (with all its assumptions).
1  null.t.test(web, N = 30, ...)

web 
A matrix representing the interactions observed between higher trophic level species (columns) and lower trophic level species (rows). 
N 
Number of null models to be produced; see ‘Note’ below! 
... 
Optional parameters to be passed on to the functions

This is only a very rough nullmodel test. There are various reasons why one may consider r2dtable
as an incorrect way to construct null models (e.g.~because it yields very different connectance values compared to the original). It is merely used here to indicate into which direction a proper development of null models may start off. Also, if the distribution of null models is very skewed, a ttest is obviously not the test of choice.
Finally, not all indices will be reasonably testable (e.g.~number of species is fixed), or are returned by the function networklevel
in a form that null.t.test
can make use of (e.g.~degree distribution fits).
Returns a table with one row per index, and columns giving
obs 
observed value 
null mean 
mean null model value 
lower CI 
lower 95% confidence interval (or whatever level is specified in the function's call) 
upper CI 
upper 95% confidence interval (or whatever level is specified in the function's call) 
t 
tstatistic 
P 
Pvalue of t statistic 
This function is rather slow. Using large replications in combination with iterative indices (degree distribution, compartment diversity, extinction slope, H2) may lead to rather long runtimes!
Carsten F. Dormann carsten.dormann@biom.unifreiburg.de
1 2 3  data(mosquin1967)
null.t.test(mosquin1967, index=c("generality", "vulnerability",
"cluster coefficient", "H2", "ISA", "SA"), nrep=2, N=10)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.