GU_normalization {ddecompose} | R Documentation |
Gardeazabal and Ugidos normalization of factor variables
Description
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.
Usage
GU_normalization(formula, data, weights, group)
Arguments
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. |
Value
a list containing the adjusted formula, adjusted data, adjusted coefficient names, and the normalized regressors for prediction and the
References
Gardeazabal, Javier, and Arantza Ugidos. 2004. "More on identification in detailed wage decompositions." Review of Economics and Statistics 86(4): 1034-1036.
Examples
data("men8305")
mod1 <- log(wage) ~ union + married + nonwhite + education + experience
normalized_data <- GU_normalization(
formula = mod1,
data = men8305,
weights = weights,
group = year
)