Synthesizes one variable (y) from another one (x)
when y is nested in the categories of x. A bootstrap
sample is created from the original values of y within each category
of xp (the syntheisied values of the grouping variable).
syn.nested(y, x, xp, ...)an original data vector of length n for the nested variable.
an original data vector of length n for the variable within
which y is nested.
a vector of length k with synthetic values of x.
additional parameters.
A vector of length k with synthetic values of y.
An example would be when x is a detailed classification
of occupations and y is more detailed sub-classification. It is
intended that both x and y are categorical (factor) variables.
A warning will be issued if the original y is not nested within x.