lnre.vgc
computes expected vocabulary growth curves
vgc
. Data points are returned for the specified values of
lnre.vgc(model, N, m.max=0, variances=FALSE)
an object belonging to a subclass of lnre
,
representing a LNRE model
an increasing sequence of non-negative integers, specifying
the sample sizes
if specified, include vocabulary growth curves
m.max
. Must be a
single integer in the range
if TRUE
, include variance estimates for the
vocabulary size (and the spectrum elements, if applicable)
An object of class vgc
, representing the expected vocabulary
growth curve lnre
, with data
points at the sample sizes N
.
If m.max
is specified, expected growth curves m.max
are also computed.
If variances=TRUE
, the vgc
object includes variance data
for all growth curves.
~~ TODO, if any ~~
vgc
for more information about vocabulary growth curves
and links to relevant functions; lnre
for more
information about LNRE models and how to initialize them
# NOT RUN {
## load Dickens dataset and estimate lnre models
data(Dickens.spc)
zm <- lnre("zm",Dickens.spc)
fzm <- lnre("fzm",Dickens.spc,exact=FALSE)
gigp <- lnre("gigp",Dickens.spc)
## compute expected V and V_1 growth up to 100 million tokens
## in 100 steps of 1 million tokens
zm.vgc <- lnre.vgc(zm,(1:100)*1e6, m.max=1)
fzm.vgc <- lnre.vgc(fzm,(1:100)*1e6, m.max=1)
gigp.vgc <- lnre.vgc(gigp,(1:100)*1e6, m.max=1)
## compare
plot(zm.vgc,fzm.vgc,gigp.vgc,add.m=1,legend=c("ZM","fZM","GIGP"))
## load Italian ultra- prefix data
data(ItaUltra.spc)
## compute zm model
zm <- lnre("zm",ItaUltra.spc)
## compute vgc up to about twice the sample size
## with variance of V
zm.vgc <- lnre.vgc(zm,(1:100)*70, variances=TRUE)
## plot with confidence intervals derived from variance in
## vgc (with larger datasets, ci will typically be almost
## invisible)
plot(zm.vgc)
# }
Run the code above in your browser using DataLab