RecordsToFrequencies {cmm}  R Documentation 
RecordsToFrequencies
Description
Converts Records (units x variables) into a frequency vector.
Usage
RecordsToFrequencies(dat, var = varDefault, dim = dimDefault, augment = "all",
seed = FALSE)
Arguments
dat 
matrix or dataframe containing the scores of units (rows) on categorical variables (columns) 
var 
character or numeric vector containing variables. By default, all variables are selected. 
dim 
numeric vector indicating the dimension of 
augment 
augmentation: determines the type of frequency vector. Select one of four options:

seed 
integer. As 
Value
matrix
Author(s)
W. P. Bergsma w.p.bergsma@lse.ac.uk and L. A. van der Ark L.A.vanderArk@uva.nl
References
Van der Ark, L. A., Bergsma, W. P., & Koopman L. (2023) Maximum augmented empirical likelihood estimation of categorical marginal models for large sparse contingency tables. Paper submitted for publication.
See Also
Examples
data(acl)
dat < acl[, 1:2] + 1 # select 2 items from ACL
var < 1 : ncol(dat) # define the variables
marg < Margins(var, c(0, 1)) # margins are total (0) and 1st order
dim < rep(5, length(var))
t(RecordsToFrequencies(dat, var, dim, "obs")) # frequency vector with observed cells
t(RecordsToFrequencies(dat, var, dim, "1k")) # frequency vector with observed and