aggr_data | R Documentation |
Given a matrix of configurations (covariates and responses) unit-by-unit, this function finds the corresponding matrix of distinct configurations and the corresponding vector of frequencies (it does not work properly with missing data).
aggr_data(data, disp=FALSE, fort=FALSE)
data |
matrix of covariate and unit-by-unit response configurations |
disp |
to display partial results |
fort |
to use fortran routines when possible |
data_dis |
matrix of distinct configurations |
freq |
vector of corresponding frequencies |
label |
the index of each provided response configuration among the distinct ones |
Francesco Bartolucci - University of Perugia (IT)
# draw a matrix of random responses and find distinct responses
X = matrix(sample(5,100,replace=TRUE),50,2)
out = aggr_data(X)
# find the distinct responses and the corresponding vector of frequencies
# for naep data
data(naep)
X = as.matrix(naep)
out = aggr_data(X)
length(out$freq)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.