VV
and VVm
are generic methods that can (and should) be
used to compute the variance of the vocabulary size and the variances
of spectrum elements according to an LNRE model (i.e. an object of
class lnre
). These methods are also used to access variance
information stored in some objects of class spc
and vgc
.
VV(obj, N=NA, ...)
VVm(obj, m, N=NA, ...)
an object of class lnre
(LNRE model), spc
(frequency spectrum) or vgc
(vocabulary growth curve).
positive integer value determining the frequency class \(m\) for which variances are returned (or a vector of such values).
sample size \(N\) for which variances are calculated
(lnre
objects only)
additional arguments passed on to the method implementation (see respective manpages for details)
For a LNRE model (class lnre
), VV
computes the variance
of the random variable \(V(N)\) (vocabulary size), and VVm
computes the variance of the random variables \(V_m(N)\) (spectrum
elements), for a sample of specified size \(N\).
For an observed or interpolated frequency spectrum (class spc
),
VV
returns the variance of the expected vocabulary size, and
VVm
returns variances of the spectrum elements. These methods
are only applicable if the spc
object includes variance
information.
For an expected or interpolated vocabulary growth curve (class
vgc
), VV
returns the variance vector of the expected
vocabulary sizes \(V\), and VVm
the corresponding vector for
\(V_m\). These methods are only applicable if the vgc
object
includes variance information.
spc
and vgc
objects must represent an expected or
interpolated frequency spectrum or VGC, and must include variance
data.
For vgc
objects, the VVm
method allows only a single
value m
to be specified.
The argument N
is only allowed for LNRE models and will trigger
an error message otherwise.
For details on the implementations of these methods, see VV.spc
, VV.vgc
, etc.
Expected vocabulary size and frequency spectrum for a sample of size
\(N\) according to a LNRE model can be computed with the analogous
methods EV
and EVm
. For spc
and
vgc
objects, \(V\) and \(V_m\) are always accessed with the
methods V
and Vm
, even if they represent
expected or interpolated values.
# NOT RUN {
## see lnre documentation for examples
# }
Run the code above in your browser using DataLab