mseZ: Compute z-score of mean squared error

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/residuals.meteDist.R

Description

mseZ.meteDist Compute z-score of mean squared error

Usage

1
2
3
4
5
mseZ(x, ...)

## S3 method for class 'meteDist'
mseZ(x, nrep, return.sim = TRUE, type = c("rank",
  "cumulative"), relative = TRUE, log = FALSE, ...)

Arguments

x

a meteDist object

...

arguments to be passed to methods

nrep

number of simulations from the fitted METE distribution

return.sim

logical; return the simulated liklihood values

type

either "rank" or "cumulative"

relative

logical; if true use relative MSE

log

logical; if TRUE calculate MSE on logged distirbution. If FALSE use arithmetic scale

Details

mseZ.meteDist simulates from a fitted METE distribution (e.g. a species abundance distribution or individual power distribution) and calculates the MSE between the simulated data sets and the METE prediction. The distribution of these values is compared against the MSE of the data to obtain a z-score in the same was as logLikZ; see that help document for more details.

Value

list with elements

z

The z-score

sim

nrep Simulated values

Author(s)

Andy Rominger <ajrominger@gmail.com>, Cory Merow

References

Harte, J. 2011. Maximum entropy and ecology: a theory of abundance, distribution, and energetics. Oxford University Press.

See Also

logLikZ

Examples

1
2
3
4
5
6
esf1=meteESF(spp=arth$spp,
              abund=arth$count,
              power=arth$mass^(4/3),
              minE=min(arth$mass^(4/3)))
sad1=sad(esf1)
mseZ(sad1, nrep=100, type='rank',return.sim=TRUE)

cmerow/meteR documentation built on May 13, 2019, 8:23 p.m.