write.lexstats {UCS}R Documentation

Write Data Files for Goodness-of-Fit Evaluation of LNRE Model (zm, fzm)

Description

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).

Usage

write.lexstats(model, file)

Arguments

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

Details

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).

Value

The full basename of the created files (obtained by adding a model-specific suffix to the file parameter).

References

Baayen, R. Harald (2001). Word Frequency Distributions. Kluwer, Dordrecht.

See Also

zm, fzm, EV, EVm


[Package Contents]