calculateExpected | R Documentation |
Calculate the expected number of species at a site based on a RIVPACS model. The function uses a matrix of group membership probabilities, the calibration matrix of species occurrence data, and the calibration data group indicators.
calculateExpected(x, occur, group)
x |
a site * group matrix of predicted group membership probabilities from a RIVPACS model (for new data) |
occur |
the site * species binary matrix of calibration data used to fit the RIVPACS model |
group |
a vector of group indicators for the calibration data |
a nsite (new data) * nspecies (in calibration data) matrix of expected number of species
x <- matrix(rbinom(100, size = 1, prob = 0.5), ncol = 10) y <- matrix(c(0.1,0.8,0.9,0.2), ncol = 2) group <- rep(1:2, each = 5) calculateExpected(y, x, group)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.