Learn R Programming

rifreg (version 1.1.0)

get_rif_quantiles: Estimate RIF at Quantiles

Description

Function to estimate the recentered influence function (RIF) at one or several specified quantiles of a weighted distribution of a dependent variable.

Usage

get_rif_quantiles(dep_var, weights, probs, ...)

get_rif_quantile(dep_var, weights, probs, ...)

Value

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.

Arguments

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 dep_var. The default (NULL) is equivalent to weights = rep(1, length(dep_var)).

probs

the specific quantile at which to estimate the RIF.

...

further arguments passed on to density.

Functions

  • get_rif_quantile(): Helper function to estimate the RIF values at a specific quantile.

Examples

Run this code
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)

Run the code above in your browser using DataLab