Learn R Programming

asbio (version 0.2-1)

pseudo.v: Jacknife pseudo-values

Description

The function returns first-order jackknife pseudovalues which can be used to create jackknife summaries, e.g. the jackknife parameter estimate, and the jackknife standard error. The function can be run on univariate data (matrix = FALSE) or multivariate data (matrix =TRUE). In the later case matrix rows are treated as multivariate observations.

Usage

pseudo.v(data, statistic, matrix = FALSE)

Arguments

data
A vector (matrix =FALSE) or matrix (matrix=TRUE) of quantitative data.
statistic
A function whose output is a statistic (e.g. a sample mean). The function must have only one argument, a call to data.
matrix
A logical statement. If matrix = TRUE then rows in the matrix are sampled as multivariate observations.

Value

  • A vector of first-order jackknife pseudovalues is returned.

Details

In the first order jackknife procedure a statistic $\hat{\theta}$ is calculated using all n samples, it is then calculated with the first observation removed $\hat{\theta}$$_{-1}$, with only the second observation removed, $\hat{\theta}$$_{-2}$, and so on. This process is repeated for all n samples. The resulting vector of size n contains pseudovalues for their respective observations.

References

Manly, B. F. J. (1997) Randomization and Monte Carlo methods in biology, 2nd edition. Chapman and Hall, London.

See Also

empinf, boot, bootstrap

Examples

Run this code
library(vegan)
data(varespec)
# A partial set of observations from a single plot for a Scandinavian moss/vascular plant/lichen survey.
site18<-data.frame(t(varespec[1,][1:20]))

#Shannon-Weiner diversity
SW<-function(data){
d<-data[data!=0]
p<-d/sum(d)
-1*sum(p*log(p))
}

pv<-pseudo.v(site18,SW)

Run the code above in your browser using DataLab