Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for quantile regression #412

Open
yuryzablotski opened this issue Dec 27, 2023 · 0 comments
Open

support for quantile regression #412

yuryzablotski opened this issue Dec 27, 2023 · 0 comments

Comments

@yuryzablotski
Copy link

Describe the solution you'd like
I would like to be able to report results of quantile regression similarly, like it's currently possible for OLS / GLM. A single quantile would be great, all quantiles at once would be terrific!

How could we do it?
Should be very similar to OLS with the use of "tau" argument, where tau is the quantile.

Code example

library(ISLR)
library(quantreg)

lr <- lm(wage ~ jobclass + age, Wage)
qr10 <- rq(wage ~ jobclass + age, Wage, tau = 0.1)
qr50 <- rq(wage ~ jobclass + age, Wage, tau = 0.5)
qr90 <- rq(wage ~ jobclass + age, Wage, tau = 0.9)

qr_all <- rq(wage ~ jobclass + age, Wage,
tau = seq(.05, .95, by = 0.05))

summary(qr_all) %>% plot()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant