Collapse CRC data through micro post-stratification
Rounding continuous covariates creates "micro-post-strata" and therefore
tends to reduce the number of distinct covariate vectors. After rounding,
the data is collapsed so that there is exactly one row for each distinct
covariate vector, and a column called
mct (for multinomial cell
count) is appended with that contains the number of records corresponding to
The data in a matrix form
A vector of names of variables to be rounded for the purpose of collapsing the data.
A vector of scalars that determines how much each
corresponding variable in
Continuous variables will be divided by
rounding.scale, then rounded
to the nearest whole number, and then multiplied by
The net effect is to round to the nearest multiple of
Another matrix, just like the input
dat except that there are
fewer rows, data values are rounded, and there is a new column
mct, which gives the number of data points corresponding to each row.
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.