lnre_productivity_measures: Measures of Productivity and Lexical Richness (zipfR)

Description Usage Arguments Details Value Productivity Measures References See Also Examples

Description

Compute expectations of various measures of productivity and lexical richness for a LNRE population.

Usage

1
2
3
lnre.productivity.measures(model, N=NULL, measures, data.frame=TRUE, 
                           bootstrap=FALSE, method="normal", conf.level=.95, sample=NULL,
                           replicates=1000, parallel=1L, verbose=TRUE, seed=NULL)

Arguments

model

an object belonging to a subclass of lnre, representing a LNRE model

measures

character vector naming the productivity measures to be computed (see productivity.measures for details). Names may be abbreviated as long as they remain unique. If unspecified or NULL, all supported measures are included.

N

an integer vector, specifying the sample size(s) N for which the productivity measures will be calculated. If bootstrap=TRUE, only a single sample size may be specified. N defaults to the sample size used for estimating model if unspecified or set to NULL.

data.frame

if TRUE, the return value is converted to a data frame for convenience in interactive use (default).

bootstrap

if TRUE, use parametric bootstrapping to estimate expectations and confidence intervals for the productivity measures. Otherwise, approximate expectations are obtained directly from the LNRE model (see ‘Details’ below for the approximations and simplifications used).

method, conf.level

type of confidence interval to be estimated by parametric bootstrapping and the requested confidence level; see bootstrap.confint for details.

sample

optional callback function to generate bootstrapping samples; see lnre.bootstrap for details and applications.

replicates, parallel, seed, verbose

if bootstrap=TRUE, these parameters are passed on to lnre.bootstrap to control the bootstrapping procedure; see lnre.bootstrap for documentation. In most cases, it is recommended to set parallel in order to speed up the expensive bootstrapping process.

Details

If bootstrap=FALSE, expected values of the productivity measures are computed based on the following approximations:

Approximations used for expected values are explained in detail in Sec. 2.2 of the technical report Inside zipfR.

Value

If bootstrap=FALSE, a numeric matrix or data frame listing approximate expectations of the selected productivity measures, with one row for each sample size N and one column for each measure. Rows and columns are labelled.

If bootstrap=TRUE, a numeric matrix or data frame with one column for each productivity measure and four rows giving the lower and upper bound of the confidence interval, an estimate of central tendency, and an estimate of spread. See bootstrap.confint for details.

Productivity Measures

See productivity.measures for a list of supported measures with equations and references. The measures Entropy and eta are only supported for bootstrap=TRUE.

References

Díaz-Francés, Eloísa and Rubio, Francisco J. (2013). On the existence of a normal approximation to the distribution of the ratio of two independent normal random variables. Statistical Papers, 54(2), 309–323.

Simpson, E. H. (1949). Measurement of diversity. Nature, 163, 688.

See Also

productivity.measures computes productivity measures from observed data sets. See lnre for further information on LNRE models, and lnre.bootstrap and bootstrap.confint for details on the bootstrapping procedure.

Examples

1
2
3
4
5
6
7
8
9
## plausible model for an author's vocabulary
model <- lnre("fzm", alpha=0.4, B=0.06, A=1e-12)

## approximate expectation for different sample sizes
lnre.productivity.measures(model, N=c(1000, 10000, 50000))

## estimate sampling distribution: 95% interval, mean, s.d.
## (using parametric bootstrapping, only one sample size at a time)
lnre.productivity.measures(model, N=1000, bootstrap=TRUE)

zipfR documentation built on Nov. 13, 2020, 3:01 a.m.