The finite Zipf-Mandelbrot (fZM) LNRE model of Evert (2004).
The constructor function lnre.fzm
is not user-visible. It is
invoked implicitly when lnre
is called with LNRE model type
"fzm"
.
lnre.fzm(alpha=.8, A=1e-9, B=.01, param=list()) ## user call: lnre("fzm", spc=spc) or lnre("fzm", alpha=.8, A=1e-9, B=.01)
the shape parameter
the lower cutoff parameter
the upper cutoff parameter
a list of parameters given as name-value pairs (alternative method of parameter specification)
A partially initialized object of class lnre.fzm
, which is
completed and passed back to the user by the lnre function.
See lnre
for a detailed description of lnre.fzm
objects (as a subclass of lnre
).
Similar to ZM, the fZM model is a LNRE re-formulation of the
Zipf-Mandelbrot law for a population with a finite vocabulary
size
for
for
and the population vocabulary size is
See Evert (2004) and the lnre.zm
manpage for further
details.
The parameters of the fZM model can either be specified as immediate arguments:
lnre.fzm(alpha=.5, A=5e-12, B=.1)
or as a list of name-value pairs:
lnre.fzm(param=list(alpha=.5, A=5e-12, B=.1))
which is usually more convenient when the constructor is invoked by
another function (such as lnre
). If both immediate arguments
and the param
list are given, the immediate arguments override
conflicting values in param
. For any parameters that are
neither specified as immediate arguments nor listed in param
,
the defaults from the function prototype are inserted.
The lnre.fzm
constructor also checks the types and ranges of
parameter values and aborts with an error message if an invalid
parameter is detected.
NB: parameter estimation is faster and more robust for the
inexact fZM model, so you might consider passing the
exact=FALSE
option to lnre
unless you intend to make
predictions for small sample sizes
Baayen, R. Harald (2001). Word Frequency Distributions. Kluwer, Dordrecht.
Evert, Stefan (2004). A simple LNRE model for random character sequences. Proceedings of JADT 2004, 411-422.
lnre
for pointers to relevant methods and functions for
objects of class lnre
, as well as a complete listing of LNRE
models implemented in the zipfR
library.