View source: R/GU_normalization.R
GU_normalization | R Documentation |
The function performs the normalization of the factor variables proposed by Gardeazabal and Ugidos (2004, GU) to estimate detailed decompositions that do not depend on the chosen reference levels of the factor variables.
GU_normalization(formula, data, weights, group)
formula |
an object of class "formula". See lm for further details. |
data |
a data frame containing the variables in the model. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
group |
name of the a binary variable (numeric or factor) identifying the two groups that will be compared. |
a list containing the adjusted formula, adjusted data, adjusted coefficient names, and the normalized regressors for prediction and the
Gardeazabal, Javier, and Arantza Ugidos. 2004. "More on identification in detailed wage decompositions." Review of Economics and Statistics 86(4): 1034-1036.
data("men8305")
mod1 <- log(wage) ~ union + married + nonwhite + education + experience
normalized_data <- GU_normalization(
formula = mod1,
data = men8305,
weights = weights,
group = year
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.