View source: R/MIDIAweightingFUNC.R
MDIAwtGroups | R Documentation |
Method is from Haberman, 1984.
MDIAwtGroups(formula, data, groups, targetgroup = NA)
formula |
A formula indicating the variables on which matching should be achieved after weighting. For example, ~x+I(x^2)+y+I(y^2)+I(y^3) would achieve matched values on the mean value of x, the squared mean value of x (essentially equivalent to the variance), and (essentially) the mean, standard deviation and skewness of y. |
data |
A data frame. |
groups |
A vector indicating the group to which each row of the data belongs. |
targetgroup |
Single value indicating which group defines the population to which all other groups should be weighted. By default all groups are weighted to match the overall mean. |
A vector of weights.
Haberman, S. J. (1984). Adjustment by minimum discriminant information. The Annals of Statistics, 12(3), 971-988.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.