Last chance! 50% off unlimited learning
Sale ends in
vgc.interp
computes the expected vocabulary growth curve for
random sample taken from a data set described by the frequency
spectrum object obj
.
vgc.interp(obj, N, m.max=0, allow.extrapolation=FALSE)
an object of class spc
, representing the frequency
spectrum of the data set from which samples are taken
a vector of increasing non-negative integers specifying the sample sizes for the expected vocabulary size is calculated (as well as expected spectrum elements if requested)
an integer in the range
if TRUE
, the requested sample sizes
obj
, so that binomial extrapolation is performed.
This obtion should be used with great caution (see
EV.spc
for details).
An object of class vgc
, representing the expected vocabulary
growth curves for random samples taken from the data set described by
obj
. Data points will be generated for the specified sample
sizes N
.
See the EV.spc
manpage for more information, especially
concerning binomial extrapolation.
Note that the result of vgc.interp
is an object of class
vgc
(a vocabulary growth curve), but its input is an
object of class spc
(a frequency spectrum).
vgc
for more information about vocabulary growth curves
and links to relevant functions; spc
for more
information about frequency spectra
The implementation of vgc.interp
is based on the functions
EV.spc
and EVm.spc
. See the respective
manpages for technical details.
spc.interp
computes the expected frequency spectrum for
a random sample by binomial interpolation.
# NOT RUN {
## load the Tiger PP expansion spectrum
## (sample size: about 91k tokens)
data(TigerPP.spc)
## binomially interpolated curve
TigerPP.bin.vgc <- vgc.interp(TigerPP.spc,(1:100)*910)
summary(TigerPP.bin.vgc)
## let's also add growth of V_1 to V_5 and plot
TigerPP.bin.vgc <- vgc.interp(TigerPP.spc,(1:100)*910,m.max=5)
plot(TigerPP.bin.vgc,add.m=c(1:5))
# }
Run the code above in your browser using DataLab