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
1
vote
2 answers

Unexpected quantile relationship

I want to fit a quantile regression model to my observed data, which clearly show a triangular relationship between the response and predictor variables: When I do: library("quantreg") m1 <- rq(Y~ X, tau = 0.75, data=mydata) summary(m1) Call:…
sca
  • 23
  • 1
  • 5
1
vote
2 answers

Censored quantile regression in R: getting specific quantiles

I've generated the following data in R: library(quantreg) library(survival) set.seed(789) N <- 2000 u <- runif(N) x1 <- rbinom(N,1,.5) x2 <- rbinom(N,1,.5) x1x2<-x1*x2 lambda <- 1 + 1.5*x1 + 1.5*x2 + .5*x1x2 k <- 2 y <-…
Ashley Naimi
  • 232
  • 1
  • 9
1
vote
1 answer

Display single coefficient plots in quantile regressions?

I am plotting regression summaries for a quantile regression I did with quantreg. Obviously the method plot.summary.rqs is in use here. The problem is that is use quite a few explanatory variables each of which are displayed in the plot. Most of the…
Matt Bannert
  • 27,631
  • 38
  • 141
  • 207
1
vote
0 answers

Different speed of quantreg lib on win7 and linux mint

I'm using quantreg library on both win7 64bit and linux Mint Maya 64bit and I realised big speed difference. I'm using Frisch-Newton method written in Fortran and I was mesuring speed only of the .Fortran() calling. I'm analyzing vector with length…
user1991825
  • 309
  • 1
  • 5
  • 16
1
vote
1 answer

lapack not linked to when compiling package quantreg

Package quantreg fails to install because it does not link to lapack: install.packages("quantreg") [snip] gcc -std=gnu99 -shared -o quantreg.so akj.o boot.o brute.o chlfct.o cholesky.o combos.o crq.o crqfnb.o dsel05.o etime.o extract.o idmin.o…
user907385
  • 21
  • 3
1
vote
1 answer

R quantreg - get effect at each level of a covariate

I have a quantile regression that I'm running in the quantreg package of R as below: read19 <- rq(comppercentile~q19*mothered+ethnicity+gender,tau=.5,data=medmodel) q19 is quantitative and mothered is a 2 level factor. Once I get a significant…
SJB
  • 11
  • 1
0
votes
1 answer

Accessing the quantile regression estimates values from the rq function

I am performing a quantile regression as following: library(quantreg) #quantile regression framework #function to perform quantile regression with bootstrap confidence intervals rq_bootstrap <- function(data, n_bootstrap = 1000) { rq_model <-…
Recology
  • 165
  • 1
  • 10
0
votes
0 answers

Quantreg `summary.rq` takes too long to give results

I have a data set (joined) of 730,099 observations and 16 variables, to which I applied a quantile regression model using the following code: library(quantreg) taus <- c(0.1, 0.25, 0.5, 0.75, 0.9) res <-…
Saïd Maanan
  • 511
  • 4
  • 14
0
votes
0 answers

r raster clusterR error when calculating model uncertainty

I am trying to pass the cubist model parameters to the quantregForest and using the clusterR function to calculate the cubist model uncertainty. When running the code, I encounter some trouble. I don't know where this problem comes from. Strangely,…
petrel
  • 1
  • 2
0
votes
1 answer

quantreg::rq in R provides unstable p-values

using R, I m performing a backtest on a time series by using quantile regression (quantreg::rq) on a number of features. These features are then selected based on a condition such as p-values <= 5%. If I run the routine multiple times, I always end…
0
votes
0 answers

statsmodels quantreg: including fixed effects

How do I include fixed effects when using the statsmodels.regression.quantile_regression.QuantReg function? Is there an efficient way of doing this or do I have to include dummy variables to account for the fixed effects?
shenflow
  • 345
  • 2
  • 12
0
votes
0 answers

Problems with rqpd - CRE method

I've been trying to run a quantile regression for panel data in R, using the 'rqpd' package and it works normally for PFE method (fixed effects). However, when I run the CRE method, it fails. Below are the codes I am using and the messages the…
0
votes
1 answer

ValueError; Quantreg with Intercept

I am working with the following dataframe, called test: y intercept x 0 -1.6168468132687293 1 NA 1 1.5500031232431757 1 NA 2 1.5952617833602785 1 1.5500031232431757 3 1.1390724309357498…
shenflow
  • 345
  • 2
  • 12
0
votes
1 answer

Quantile regression model from `quantreg` does not finish computation

I am developing an iterative algorithm that uses quantile regression models at each iteration. For that I use the rq function from the quantreg package in R. So far it has worked fine. However, I have found a dataset where, at one of the iterations,…
0
votes
1 answer

R: how to create an object of class "rq" manually?

How can I create manually an object of class "rq" such that I can use it afterwards to run the predict function? Thanks to your very useful replies, mymdl is now of class "rq" in this example. Adding class(mymdl$coefficients) ="numeric" to the code…
glaucon
  • 190
  • 1
  • 9