Learn R Programming

breakaway (version 3.0)

betta: modelling total diversity

Description

This function tests for heterogeneity of total diversity (observed plus unobserved) across multiple sites. It can account or test for fixed effects that may explain diversity. It returns the significance of the covariates in explaining diversity and a hypothesis test for heterogeneity.

Usage

betta(chats, ses, X = NA)

Arguments

chats
A vector of estimates of total diversity at different sampling locations. breakaway estimates are suggested in the high-diversity case but not enforced.
ses
The standard errors in chats, the diversity estimates.
X
A numeric matrix of covariates. If not supplied, an intercept-only model will be fit.

Value

table
A coefficient table for the model parameters. The columns give the parameter estimates, standard errors, and p-values, respectively. This model is only as effective as your diversity estimation procedure; for this reason please confirm that your estimates are appropriate and that your model is not misspecified. betta_pic may be useful for this purpose.
cov
Estimated covariance matrix of the parameter estimates.
ssq_u
The estimate of the heterogeneity variance.
homogeneity
The test statistic and p-value for the test of homogeneity.
global
The test statistic and p-value for the test of model explanatory power.
blups
The conditional expected values of the diversity estimates (conditional on the random effects). The authors propose that if the practitioner believes that information from one diversity estimator may inform the others, then using the condfits as estimators of total diversity rather than Chats may reduce variance of diversity estimates by ``sharing strength'' across the samples.
blupses
The estimated standard deviation (standard errors) in the blups.

References

Willis, A., Bunge, J., and Whitman, T. (2015). Inference for changes in biodiversity. arXiv preprint.

Willis, A. and Bunge, J. (2015). Estimating diversity via frequency ratios. Biometrics.

See Also

breakaway; breakaway_nof1; betta_pic; apples

Examples

Run this code

## handles missing data
betta(c(2000, 3000, 4000, 3000), c(100, 200, 150, NA))

## A test for heterogeneity of apples diversity estimates vs butterfly estimates
betta(c(1552,1500,884),c(305,675,205), cbind(1,c(0,0,1)))

Run the code above in your browser using DataLab