Extreme Bounds Analysis with Quantile Regression

Dear All,

I plan to do a research on the determinants of stock prices in both developed- and emerging-market contexts, using ExtremeBounds. However, rather than applying the OLS regression framework, I think of employing the more comprehensive quantile regression model, given that such determinants may vary depending on market regimes. Based on ExtremeBounds R package, I tried many times to use the following modified code:

library(ExtremeBounds)

perform Extreme Bounds Analysis

eba.results <- eba(formula = mpg ~ wt | hp + gear | cyl + disp + drat + qsec + vs + am + carb,
data = mtcars[1:10, ], reg.fun= rq)

print out results

print(eba.results)

Instead of reg.fun=lm, I changed to reg. fun= rq

unfortunately, I got no success. I would really appreciate, if you could help me out on how to change the default OLS regression to Quantile regression. Thank you.

what package is rq() supposed to be from ? have you loaded it ?

Dear Nirgrahamuk,
Many thanks for your reply. I downloaded library(quantreg). But, I am at a loss of how to insert a quantreg command into the EXTREMEBOUNDS code. I thought that writing "reg.fun=rq" would be sufficient to get the desired outcome, but it turned out to be a fiasco.
library(ExtremeBounds)
library(quantreg)
perform Extreme Bounds Analysis
eba.results <- eba(formula = mpg ~ wt | hp + gear | cyl + disp + drat + qsec + vs + am + carb,
data = mtcars[1:10, ], reg.fun= rq)
print out results
print(eba.results)

reg.fun
a function that estimates the desired regression model. The function must accept arguments formula and data in the same way that the standard functions lm and glm do. Additional arguments can be passed on via the ... argument. In this way, the user can make eba estimate, say, a logistic or probit regression by setting reg.fun = glm and passing on the appropriate values for glm's family argument through eba's ... argument. By default, an Ordinary Least Squares (OLS) regression is performed via the lm function.

if quantreg::rq doesnt interpret formula in the same way as lm and glm do that would explain the problem.

Now, I got it. Thank you so much for your clarification.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.