Questions tagged [quantreg]

quantreg is an R package that provides tools for estimation and inference of models of conditional quantiles.

This package includes methods for

  • linear and nonlinear parametric and non-parametric (total variation penalized) models for conditional quantiles of a univariate response
  • handling censored survival data
  • Portfolio selection based on expected shortfall risk

The package was created by and is maintained by Roger Koenker.

100 questions
0
votes
1 answer

quantreg package: predict.rq does only accept a single tau

I am using quantreg package to calculate quantile regressions. I am fitting regressions for a number of taus and would like to calculate predicted values and 95% confidence intervals. The problem is that the function predict.qr seems not to allow…
ehi
  • 409
  • 8
  • 23
0
votes
1 answer

Building matrix from Extracting Coefficients and Interval from summary

I have this data.frame: df <- data.frame(a=rnorm(500),b=rnorm(500),c=rnorm(500), d=rnorm(500),e=rnorm(500),f=rnorm(500),g=rnorm(500)) And i run quantile regression: library(quantreg) a<-rq(a~g,tau =…
Laorie
  • 319
  • 1
  • 7
0
votes
0 answers

Fit quantile regression. Different number of rows test/training

I need to fit quantile regression to my data. I use code like this: library(quantreg) quantreg25 <- rq(Y ~ X, tau = 0.25) P <- predict.rq(quantreg25, newdata=test) However, I get error message: Warning message: 'newdata' had 60000 rows but…
Bear
  • 338
  • 1
  • 3
  • 11
0
votes
1 answer

Hypothesis test on quantile slope against OLS slope

Using the excellent quantreg package and testing hypothesis of equal slopes between quantile 0.1 and 0.9 using standard anova function. model <- food ~ income anova(rq(model,tau=0.1), rq(model,tau=0.9)) A zero p-val leads us to reject the null…
rrg
  • 655
  • 2
  • 6
  • 24
0
votes
0 answers

Change line style in stat_quantiles if they are significative or not gplot2 R

I am making an analysis of covariance using quantiles and I would like to plot using ggplot2 quantile lines by group but changing the style if they are significant at some level e.g. p<0.1 …
Leosar
  • 2,010
  • 4
  • 21
  • 32
0
votes
1 answer

How to add title in multiple plots from R summary objects

I am trying to rename title of each plot in multiple plots from R summary objects. I do quintile regression and I'd like to plot coefficients. I do the following qr.1 <-summary( rq (y ~ x1+x2, tau=5:95/100, data=mydata)) plot(qr.1) plot(qr.1)…
yudo
  • 1
  • 1
0
votes
0 answers

Quantile regression analysis in R

I have noticed that whenever I try to plot the coefficient graphs with their confidence intervals (CI) with the normal OLS coefficients and their CI, I get an error whenever I force the regression through the origin. So if I use this code (engel is…
Jason Samuels
  • 951
  • 6
  • 22
  • 40
0
votes
0 answers

Why is R removing factors from factor variables when I run a quantile regression?

I'm currently running a quantile regression model in R using Roger Koenker's quantreg package. I have an ordered categorical variable with five levels and three unordered categorical variables (day of the week, season, and whether or not it's…
Brandon Sherman
  • 673
  • 1
  • 8
  • 25
0
votes
0 answers

Quantile regression not producing output

I am trying to run some quantile regressions with the rq() function in the quantreg package. I have set up my data and created models etc (following the instructions on another site) and it all look good. See below; RE and WTPC are continuous…
wraymond
  • 295
  • 1
  • 6
  • 17
0
votes
1 answer

Testing slope in quantile regression

I am using quantreg package in R for running quantile regression (95%) on a set of data. I would like to set the slope of of the quantile regression to the value 1.4, as alreday did in a previous analysis with which I want to compare my outcomes. If…
refroll
  • 131
  • 1
  • 9
1 2 3 4 5 6
7