write.lexstats {UCS} | R Documentation |
Creates three data files in lexstats
format, which can be used
to evaluate the goodness-of-fit of a LNRE model with a multivariate
chi-squared test (Baayen, 2001, Sec. 3.3), using the lnreChi2
program (Baayen, 2001).
write.lexstats(model, file)
model |
an object of class "zm" or "fzm" ,
representing a Zipf-Mandelbrot (ZM) or finite Zipf-Mandelbrot (fZM)
LNRE model. The object must include observed word frequency data
(in components N , V , and spc ), usually
because the model parameters have been estimated from the observed
frequency spectrum. |
file |
a character string giving the basename of the files that will be created |
This functions creates files in lexstats
format with the
extensions .spc
, .sp2
, and .ev2
, which are
required by the lnreChi2
tool (Baayen, 2001, 270).
In addition, the basename file
is extended with the string
"_bZM"
(for a ZM model) or "_bfZM"
(for a fZM model),
so that the lnreChi2
tool can correctly identify the number of
degrees of freedom (reduced by two estimated parameters for the ZM
model, and three estimated parameters for the fZM model).
The full basename of the created files (obtained by adding a
model-specific suffix to the file
parameter).
Baayen, R. Harald (2001). Word Frequency Distributions. Kluwer, Dordrecht.