manipulate_qr_residuals: Manipulate residuals from a quantile regression

View source: R/aux-fcns.R

manipulate_qr_residualsR Documentation

Manipulate residuals from a quantile regression

Description

Apply a function to the residuals of a quantile regression

Usage

manipulate_qr_residuals(string_formula, tau, factor = 1, FUN = stats::sd, ...)

Arguments

string_formula

A formula to be passed to quantreg::rq in the the form of a string (string)

tau

Quantile of interest (number between 0 and 1)

factor

Number to be multiplied to the output of FUN; defaults to 1 (numeric)

FUN

A function to manipulate the residuals; defaults to stats::sd

...

Arguments passed to FUN

Details

The purpose of this function is to define the big M constant in iqr_milp, miqcp_proj, and potentially other functions.

The formula relies on variables defined outside the scope of the function.

Value

Result of factor multiplied by the output of FUN evaluated at the quantile regression specified by string_formula and tau


omkarakatta/ivqr documentation built on Aug. 20, 2022, 11:04 p.m.