Title: | Estimate Recentered Influence Function Regression |
---|---|
Description: | Provides functions to compute recentered influence functions (RIF) of a distributional variable at the mean, quantiles, variance, gini or any custom functional of interest. The package allows to regress the RIF on any number of covariates. Generic print, plot and summary functions are also provided. Reference: Firpo, Sergio, Nicole M. Fortin, and Thomas Lemieux. (2009) <doi:10.3982/ECTA6822>. "Unconditional Quantile Regressions.". |
Authors: | David Gallusser [aut], Samuel Meier [aut, cre] |
Maintainer: | Samuel Meier <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.0 |
Built: | 2024-11-28 06:31:28 UTC |
Source: | CRAN |
Helper function to check a weights vector. Makes sure the weights
are positive numeric values (not all zeros) and of the same length as the
dependent variable dep_var
. Replaces all NA
s with 0 and sets
all weights to 1 if weights is set to NULL.
check_weights(dep_var, weights)
check_weights(dep_var, weights)
dep_var |
dependent variable of distributional function. Can be any discrete or continuous vector of length 1 or more. |
weights |
positive numeric vector of |
positive numeric vector of length(dep_var)
containing the checked weights. If weights = NULL
, all weights are set to 1.
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) check_weights(dep_var, weights)
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) check_weights(dep_var, weights)
Compute the generalized Lorenz ordinates of dep_var
(i.e. the
share of total income observations up to each value in dep_var
amass
scaled by the mean income).
compute_generalized_lorenz_ordinates(dep_var, weights)
compute_generalized_lorenz_ordinates(dep_var, weights)
dep_var |
dependent variable of a distributional function. Discrete or continuous numeric vector. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
thes generalized Lorenz ordinates for a vector dep_var
.
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) generalized_lorenz_ordinates <- compute_generalized_lorenz_ordinates( dep_var = dep_var, weights = weights )
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) generalized_lorenz_ordinates <- compute_generalized_lorenz_ordinates( dep_var = dep_var, weights = weights )
Compute a weighted Gini coefficient by integrating the generalized Lorenz curve.
compute_gini(dep_var, weights)
compute_gini(dep_var, weights)
dep_var |
values of a non-negative continuous variable |
weights |
numeric vector of non-negative observation weights, hence of same length as |
The numeric value indicating the weighted Gini coefficient of the the dependent variable.
Firpo, Sergio P., Nicole M. Fortin, and Thomas Lemieux. 2018. “Decomposing Wage Distributions Using Recentered Influence Function Regressions.” Econometrics 6(2), 28.
set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) compute_gini(dep_var, weights)
set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) compute_gini(dep_var, weights)
Compute values of the ECDF for a vector dep_var
(i.e. the
empirical probability for each observation in dep_var
that a value
in dep_var
is smaller or equal).
compute_weighted_ecdf(dep_var, weights)
compute_weighted_ecdf(dep_var, weights)
dep_var |
dependent variable of a distributional function. Discrete or continuous numeric vector. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
the values of ECDF for a vector dep_var
.
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) value_of_ecdf <- compute_weighted_ecdf( dep_var = dep_var, weights = weights )
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) value_of_ecdf <- compute_weighted_ecdf( dep_var = dep_var, weights = weights )
This function estimates the recentered influence function (RIF) of a chosen distributional statistic (e.g. quantiles, variance or gini).
get_rif( dep_var, weights = NULL, statistic, probs = NULL, custom_rif_function = NULL, ... )
get_rif( dep_var, weights = NULL, statistic, probs = NULL, custom_rif_function = NULL, ... )
dep_var |
dependent variable of distributional function. Discrete or continuous numeric vector. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
statistic |
string containing the distributional statistic for which to compute the RIF. Can be one of
"mean", "variance", "quantiles", "gini", "interquantile_range", "interquantile_ratio", or "custom". If "custom"
is selected a |
probs |
a vector of length 1 or more with quantile positions to calculate the RIF.
Each quantile is indicated with value between 0 and 1. Only required if |
custom_rif_function |
the RIF function to compute the RIF of the custom distributional statistic.
Default is NULL. Only needs to be provided if |
... |
additional parameters passed to the |
a data frame with the RIF value for each observation and in the case of several quantiles a column for each quantile.
Firpo, Sergio P., Nicole M. Fortin, and Thomas Lemieux. 2009. “Unconditional Quantile Regressions.” Econometrica 77(3): 953–73.
Cowell, Frank A., and Emmanuel Flachaire. 2015. “Statistical Methods for Distributional Analysis.” In Anthony B. Atkinson and François Bourguignon (eds.), Handbook of Income Distribution. Amsterdam: Elsevier.
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) probs <- seq(1:9) / 10 weights <- c(2, 1, 3, 4, 4, 1, 6, 3) rif <- get_rif( dep_var = dep_var, weights = weights, statistic = "quantiles", probs = probs ) # custom function custom_variance_function <- function(dep_var, weights, probs = NULL) { weighted_mean <- weighted.mean(x = dep_var, w = weights) rif <- (dep_var - weighted_mean)^2 rif <- data.frame(rif, weights) names(rif) <- c("rif_variance", "weights") return(rif) } set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) # custom function top 10% percent income share # (see Essam-Nassah & Lambert, 2012, and Rios-Avila, 2020) custom_top_income_share_function <- function(dep_var, weights, probs = 0.1) { probs <- 1 - probs weighted_mean <- weighted.mean(x = dep_var, w = weights) weighted_quantile <- Hmisc::wtd.quantile(x = dep_var, weights = weights, probs = probs) lorenz_ordinate <- sum(dep_var[which(dep_var <= weighted_quantile)] * weights[which(dep_var <= weighted_quantile)]) / sum(dep_var * weights) if_lorenz_ordinate <- -(dep_var / weighted_mean) * lorenz_ordinate + ifelse(dep_var < weighted_quantile, dep_var - (1 - probs) * weighted_quantile, probs * weighted_quantile ) / weighted_mean rif_top_income_share <- (1 - lorenz_ordinate) - if_lorenz_ordinate rif <- data.frame(rif_top_income_share, weights) names(rif) <- c("rif_top_income_share", "weights") return(rif_top_income_share) } rif_custom <- get_rif( dep_var = dep_var, weights = weights, statistic = "custom", custom_rif_function = custom_variance_function )
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) probs <- seq(1:9) / 10 weights <- c(2, 1, 3, 4, 4, 1, 6, 3) rif <- get_rif( dep_var = dep_var, weights = weights, statistic = "quantiles", probs = probs ) # custom function custom_variance_function <- function(dep_var, weights, probs = NULL) { weighted_mean <- weighted.mean(x = dep_var, w = weights) rif <- (dep_var - weighted_mean)^2 rif <- data.frame(rif, weights) names(rif) <- c("rif_variance", "weights") return(rif) } set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) # custom function top 10% percent income share # (see Essam-Nassah & Lambert, 2012, and Rios-Avila, 2020) custom_top_income_share_function <- function(dep_var, weights, probs = 0.1) { probs <- 1 - probs weighted_mean <- weighted.mean(x = dep_var, w = weights) weighted_quantile <- Hmisc::wtd.quantile(x = dep_var, weights = weights, probs = probs) lorenz_ordinate <- sum(dep_var[which(dep_var <= weighted_quantile)] * weights[which(dep_var <= weighted_quantile)]) / sum(dep_var * weights) if_lorenz_ordinate <- -(dep_var / weighted_mean) * lorenz_ordinate + ifelse(dep_var < weighted_quantile, dep_var - (1 - probs) * weighted_quantile, probs * weighted_quantile ) / weighted_mean rif_top_income_share <- (1 - lorenz_ordinate) - if_lorenz_ordinate rif <- data.frame(rif_top_income_share, weights) names(rif) <- c("rif_top_income_share", "weights") return(rif_top_income_share) } rif_custom <- get_rif( dep_var = dep_var, weights = weights, statistic = "custom", custom_rif_function = custom_variance_function )
Compute the recentered influence function (RIF) of a weighted Gini coefficient.
get_rif_gini(dep_var, weights)
get_rif_gini(dep_var, weights)
dep_var |
values of a non-negative continuous dependent variable |
weights |
numeric vector of non-negative observation weights, hence of same length as |
A data frame with one column containing the RIF of the Gini coefficient for each observation.
Cowell, Frank A., and Emmanuel Flachaire. 2007. "Income distribution and inequality measurement: The problem of extreme values." Journal of Econometrics, 141(2), 1044-1072.
Firpo, Sergio P., Nicole M. Fortin, and Thomas Lemieux. 2018. “Decomposing Wage Distributions Using Recentered Influence Function Regressions.” Econometrics 6(2), 28.
Monti, Anna Clara. 1991. "The study of the Gini concentration ratio by means of the influence function." Statistica 51(4), 561–577.
set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) rif_gini <- get_rif_gini(dep_var = dep_var, weights = weights) rif_gini gini <- compute_gini(dep_var = dep_var, weights = weights) all.equal(gini, mean(rif_gini$rif_gini))
set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) rif_gini <- get_rif_gini(dep_var = dep_var, weights = weights) rif_gini gini <- compute_gini(dep_var = dep_var, weights = weights) all.equal(gini, mean(rif_gini$rif_gini))
Compute the recentered influence function (RIF) of a weighted interquantile range.
get_rif_interquantile_range(dep_var, weights, probs, ...)
get_rif_interquantile_range(dep_var, weights, probs, ...)
dep_var |
dependent variable of distributional function. Discrete or continuous numeric vector. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
probs |
a vector of length 2 with probabilities corresponding to the limits of the interquantile range of interest. The interquantile range is defined as difference between the quantile with the larger probability and the one with the lower probability. |
... |
further arguments passed on to density. |
A data frame with one column containing the RIF of the interquantile range for each observation and one column containing the weights.
Firpo, Sergio P., Nicole M. Fortin, and Thomas Lemieux. 2018. “Decomposing Wage Distributions Using Recentered Influence Function Regressions.” Econometrics 6(2), 28.
set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) get_rif_interquantile_range(dep_var, probs = c(0.1, 0.9), weights = weights)
set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) get_rif_interquantile_range(dep_var, probs = c(0.1, 0.9), weights = weights)
Compute the recentered influence function (RIF) of a weighted interquantile ratio.
get_rif_interquantile_ratio(dep_var, weights, probs, ...)
get_rif_interquantile_ratio(dep_var, weights, probs, ...)
dep_var |
dependent variable of a distributional function. Discrete or continuous numeric vector. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
probs |
a vector of length 2 with probabilities corresponding to the quantiles in the ratio's numerator and the denominator. The function defines the interquantile ratio as the ratio between the quantile with the larger probability (numerator) and the quantile with the lower probability (denominator). |
... |
further arguments passed on to density. |
A data frame with one column containing the RIF of the interquantile ratio for each observation.
Chung, Choe, and Philippe Van Kerm. 2018. "Foreign workers and the wage distribution: What does the infuence function reveal?", Econometrics 6(3), 41.
set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) get_rif_interquantile_ratio(dep_var, probs = c(0.1, 0.9), weights = weights)
set.seed(123) dep_var <- rlnorm(100) weights <- rep(1, 100) get_rif_interquantile_ratio(dep_var, probs = c(0.1, 0.9), weights = weights)
Function to estimate the recentered influence function (RIF) at the mean of a weighted distribution of a dependent variable.
get_rif_mean(dep_var)
get_rif_mean(dep_var)
dep_var |
dependent variable of a distributional function. Discrete or continuous numeric vector. |
A data frame with one column of length(dep_var)
containing the RIF at the mean.
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) get_rif_mean(dep_var)
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) get_rif_mean(dep_var)
Function to estimate the recentered influence function (RIF) at one or several specified quantiles of a weighted distribution of a dependent variable.
get_rif_quantiles(dep_var, weights, probs, ...) get_rif_quantile(dep_var, weights, probs, ...)
get_rif_quantiles(dep_var, weights, probs, ...) get_rif_quantile(dep_var, weights, probs, ...)
dep_var |
dependent variable of a distributional function. Discrete or continuous numeric vector. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
probs |
the specific quantile at which to estimate the RIF. |
... |
further arguments passed on to density. |
A data frame with the number of columns equaling the length of vector probs
and an additional column containing the weights.
Each column contains the RIF values at the quantile's probabilities.
get_rif_quantile()
: Helper function to estimate the RIF values at a specific quantile.
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) probs <- seq(1:9) / 10 weights <- c(2, 1, 3, 4, 4, 1, 6, 3) get_rif_quantiles(dep_var, probs, weights = weights)
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) probs <- seq(1:9) / 10 weights <- c(2, 1, 3, 4, 4, 1, 6, 3) get_rif_quantiles(dep_var, probs, weights = weights)
Function to estimate the recentered influence function (RIF) of the variance of a weighted distribution of a dependent variable.
get_rif_variance(dep_var, weights)
get_rif_variance(dep_var, weights)
dep_var |
dependent variable of a distributional function. Discrete or continuous numeric vector. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
A data frame with one column containing the RIF of the variance for each observation and one column containing the weights.
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) get_rif_variance(dep_var, weights = weights)
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) get_rif_variance(dep_var, weights = weights)
Computes the area under the lorenz curve.
integrate_generalized_lorenz_curve(dep_var, weights)
integrate_generalized_lorenz_curve(dep_var, weights)
dep_var |
dependent variable of a distributional function. Discrete or continuous numeric vector. |
weights |
numeric vector of non-negative observation weights, hence of same length as |
the size of the area under the lorenz curve (the integrated lorenz curve).
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) integrated_lorenz_curve <- integrate_generalized_lorenz_curve( dep_var = dep_var, weights = weights )
dep_var <- c(1, 3, 9, 16, 3, 7, 4, 9) weights <- c(2, 1, 3, 4, 4, 1, 6, 3) integrated_lorenz_curve <- integrate_generalized_lorenz_curve( dep_var = dep_var, weights = weights )
A sample of the the Merged Outgoing Rotation Group of the Current Population Survey of 1983, 1984 and 1985 used by Firpo, Fortin & Lemieux (2009). The data contains a selection of 10 variables and a sample of 26,695 observations of male workers – corresponding to a tenth of the original 266,956 observations. See Lemieux (2006) for details on data selection and recoding.
men8385
men8385
A data frame with 26,695 rows and 10 variables.
Hourly wage in US dollars at constant prices
Union status indicator
Non-white indicator
Married indicator
Factor variable with 6 education levels: high-school graduates (reference), elementary, high-school dropouts , some college, college graduates, post college graduates
Factor variable with 9 potential experience levels, each of five years gap, 20 to 24 years as reference level)
CPS sample weights
Age in years
Education in years
Experience in years
Sergio Firpo, Nicole M. Fortin, and Thomas Lemieux, "Unconditional Quantile Regressions", Econometrica, Vol. 77, No. 3 (May, 2009), pp. 953-973.
Replication files: <https://www.econometricsociety.org/publications/econometrica/2009/05/01/unconditional-quantile-regressions>
Thoms Lemieux, "Increasing Residual Wage Inequality: Composition Effects, Noisy Data, or Rising Demand for Skill?", American Economic Review, Vol. 96, No. 3 (June, 2006), pp. 461-498.
rifreg
objectCoefficients are plotted for each quantile and each covariate. Specific covariates can be selected and standard errors displayed if desired.
## S3 method for class 'rifreg' plot( x, varselect = NULL, confidence_level = 0.05, vcov = sandwich::sandwich, ... )
## S3 method for class 'rifreg' plot( x, varselect = NULL, confidence_level = 0.05, vcov = sandwich::sandwich, ... )
x |
an object of class "rifreg", usually, a result of a call to rifreg with |
varselect |
vector of length 1 or more containig the names of the covariates to display. |
confidence_level |
numeric value between 0 and 1 (default = 0.95) that defines the confidence interval
plotted as a ribbon and defined as |
vcov |
Function to estimate covariance matrix of rifreg coefficients if covariance matrix has not been bootstrapped. Per default, heteroscedasticity-consistent (HC) standard errors are calculated using sandwich. Note: These standard errors do not take the variance introduced by estimating RIF into account. |
... |
other parameters to be passed to plotting function. See ggplot for further information. |
a "ggplot" containing the coefficients for each (selected) covariate
rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "quantiles", probs = seq(0.1, 0.9, 0.1), weights = weights ) plot(rifreg) plot(rifreg, varselect = c("age", "unionyes"), confidence_level = 0.1)
rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "quantiles", probs = seq(0.1, 0.9, 0.1), weights = weights ) plot(rifreg) plot(rifreg, varselect = c("age", "unionyes"), confidence_level = 0.1)
Print method for class "rifreg"
## S3 method for class 'rifreg' print(x, ...)
## S3 method for class 'rifreg' print(x, ...)
x |
an object of class "rifreg", usually, a result of a call to rifreg. |
... |
other parameters to be passed to printing function. |
the function print.rifreg()
returns the the covariates' coefficients
of the RIF regressions derived from the fitted linear model given in object x
.
rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "quantiles", probs = seq(0.1, 0.9, 0.1), weights = weights ) print(rifreg)
rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "quantiles", probs = seq(0.1, 0.9, 0.1), weights = weights ) print(rifreg)
Estimate a recentered influence function (RIF) regression for a distributional statistic of interest.
rifreg( formula, data, statistic = "quantiles", weights = NULL, probs = c(1:9)/10, custom_rif_function = NULL, na.action = na.omit, bootstrap = FALSE, bootstrap_iterations = 100, cores = 1, ... )
rifreg( formula, data, statistic = "quantiles", weights = NULL, probs = c(1:9)/10, custom_rif_function = NULL, na.action = na.omit, bootstrap = FALSE, bootstrap_iterations = 100, cores = 1, ... )
formula |
an object of class "formula". See lm for further details. |
data |
a data frame containing the variables in the model. |
statistic |
string containing the distributional statistic for which to compute the RIF. Can be one of
"quantiles", "mean", "variance", "gini", "interquantile_range", "interquantile_ratio", or "custom".
Default is "quantiles". If "custom" is selected, a |
weights |
numeric vector of non-negative observation weights, hence of same length as |
probs |
a vector of length 1 or more with probabilities of quantiles. Each quantile is indicated with a value between 0 and 1.
Default is |
custom_rif_function |
the RIF function to compute the RIF of the custom distributional statistic.
Default is NULL. Only needs to be provided if |
na.action |
generic function that defines how NAs in the data should be handled.
Default is |
bootstrap |
boolean (default = FALSE) indicating if bootstrapped standard errors will be computed |
bootstrap_iterations |
positive integer indicating the number of bootstrap iterations to execute.
Only required if |
cores |
positive integer indicating the number of cores to use when computing bootstrapped standard errors.
Only required if |
... |
additional parameters passed to the |
rifreg
returns an object of class
"rifreg"
.
A "rifreg"
object is a list containing the following components:
estimates |
a matrix of RIF regression coefficients for each
covariate and the intercept. In case of several quantiles,
coefficient estimates for each quantile are provided.
Equivalent to |
rif_lm |
one or several objects of class |
rif |
a data frame containing the RIF for each observation. |
bootstrap_se |
bootstrapped standard errors for each coefficient.
Only provided if |
bootstrap_vcov |
the bootstrapped variance-covariance matrix for each coefficient.
Only provided if |
statistic |
the distributional statistic for which the RIF was computed. |
custom_rif_function |
The custom RIF function in case it was provided. |
probs |
the probabilities of the quantiles that were computed, in case the distributional statistic requires quantiles. |
Firpo, Sergio P., Nicole M. Fortin, and Thomas Lemieux. 2009. “Unconditional Quantile Regressions.” Econometrica 77(3): 953–73.
Cowell, Frank A., and Emmanuel Flachaire. 2015. “Statistical Methods for Distributional Analysis.” In Anthony B. Atkinson and François Bourguignon (eds.), Handbook of Income Distribution. Amsterdam: Elsevier.
rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "quantiles", weights = weights, probs = seq(0.1, 0.9, 0.1), bootstrap = FALSE ) # custom function custom_variance_function <- function(dep_var, weights, probs = NULL) { weighted_mean <- weighted.mean(x = dep_var, w = weights) rif <- (dep_var - weighted_mean)^2 rif <- data.frame(rif, weights) names(rif) <- c("rif_variance", "weights") return(rif) } rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "custom", weights = weights, probs = NULL, custom_rif_function = custom_variance_function, bootstrap = FALSE )
rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "quantiles", weights = weights, probs = seq(0.1, 0.9, 0.1), bootstrap = FALSE ) # custom function custom_variance_function <- function(dep_var, weights, probs = NULL) { weighted_mean <- weighted.mean(x = dep_var, w = weights) rif <- (dep_var - weighted_mean)^2 rif <- data.frame(rif, weights) names(rif) <- c("rif_variance", "weights") return(rif) } rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "custom", weights = weights, probs = NULL, custom_rif_function = custom_variance_function, bootstrap = FALSE )
summary method for class "rifreg"
## S3 method for class 'rifreg' summary(object, vcov = sandwich::sandwich, ...)
## S3 method for class 'rifreg' summary(object, vcov = sandwich::sandwich, ...)
object |
an object of class "rifreg", usually, a result of a call to rifreg. |
vcov |
Function to estimate covariance matrix of rifreg coefficients if covariance matrix has not been bootstrapped. Per default, heteroscedasticity-consistent (HC) standard errors are calculated using sandwich. Note: These standard errors do not take the variance introduced by estimating RIF into account. |
... |
other parameters to be passed to summary functions. |
the function summary.rifreg()
returns a list of summary statistics derived from
the rifreg object given in object
. For further details see summary.lm.
rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "quantiles", probs = seq(0.1, 0.9, 0.1), weights = weights ) summary(rifreg)
rifreg <- rifreg( formula = log(wage) ~ union + nonwhite + married + education + experience, data = men8385, statistic = "quantiles", probs = seq(0.1, 0.9, 0.1), weights = weights ) summary(rifreg)