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
3
votes
2 answers

How to store regression results from "for" loop in a list under unique name?

I am running a multiple rolling window quantile regressions on stock data such that the resulting output is an xts file with coefficients estimated at each point in time. Final estimators are then approximated from the quantiles. The 5 regressions…
Alex Bădoi
  • 830
  • 2
  • 9
  • 24
3
votes
1 answer

Plot multiple quantile regression lines with lattice and quantreg

I want to plot several quantile regression lines (quantreg package) like this: library(quantreg) data(engel) attach(engel) plot(income, foodexp, cex = 0.25, type = "n", xlab = "Household Income", ylab = "Food Expenditure") points(income,…
Leosar
  • 2,010
  • 4
  • 21
  • 32
3
votes
1 answer

(R, quantreg): Hypothesis testing a large range of quantiles

I have a quantile regression model with 1 regressor and 1 regressand. I want to hypothesis test that the regressor is equal over every quantile. One approach I've thought of is to test over all tau over {0.01,0.02,....,0.99}. However, I would then…
user1125946
3
votes
0 answers

R quantreg basksolve error

When I install the quantreg package in R I get this warning: > library(quantreg) Loading required package: SparseM Package SparseM (0.96) loaded. To cite, see citation("SparseM") Attaching package: 'SparseM' The following object(s) are…
Robert Kubrick
  • 8,413
  • 13
  • 59
  • 91
2
votes
1 answer

Confusion about the matrix "B" returned by `quantreg::boot.rq`

When invoking boot.rq like this b_10 = boot.rq(x, y, tau = .1, bsmethod = "xy", cov = TRUE, R = reps, mofn = mofn) what does the B matrix (size R x p) in b_10 contain: bootstrapped coefficient estimates or bootstrapped standard errors? The Value…
erised
  • 187
  • 7
2
votes
0 answers

Fixed Effects Quantile Regression (rqpd) with more than on type of fixed effects possible?

I try to estimate the effect of GDP (in cubic terms) on CO2 emissions. To estimatethe effect across the distribution of CO2 emissions I want to perform a quantile regression. To decrease omitted variable bias, I want to include country fixed effects…
AJPT
  • 21
  • 2
2
votes
1 answer

R Quantreg: Singularity with categorical survey data

For my Bachelor's thesis I am trying to apply a linear median regression model on constant sum data from a survey (see formula from A.Blass (2008)). It is an attempt to recreate the probability elicitation approach proposed by A. Blass et al (2008)…
2
votes
2 answers

How do I create quantile regression tables using stargazer?

I computed the following quantile regressions using the quantreg package qr_10 = rq(inno_DELTA ~ deDomains + R_and_D_pc + Pop_dens + Agr_GDP + Manufacturing_GDP + Service_GDP + Infr_Area_Percent + Res_pc + Debt_GDP + GOV_EXP_GDP + firms_total +…
2
votes
1 answer

How can I add name of xlab and ylab for each variable in Quantile regression plot?

I wrote this code for find the quantile regression plot with X-axis labels and Y-axis labels. But it only gives the plot without axis labels. How can I find the plot with axis labels for each variable. library(quantreg) quantile <- c(0.10, 0.20,…
Sorif Hossain
  • 1,231
  • 1
  • 11
  • 18
2
votes
0 answers

Getting model significance and adj R for function in R

Sample Data: ##Data preperation set.seed(5) d <- data.frame(x=seq(-5, 5, len=51)) d$y <- 50 - 0.3*d$x^2 + rnorm(nrow(d)) Function: Qr=function(x,y,taus) { QUA5<-quantreg::rq(y ~ 1 + x + I(x^2)+I(x^3)+I(x^4)+I(x^5), tau=0.5,…
Hanan
  • 33
  • 1
  • 5
2
votes
2 answers

Quantile Regression with Time-Series Models (ARIMA-ARCH) in R

I am working on quantile forecasting with time-series data. The model I am using is ARIMA(1,1,2)-ARCH(2) and I am trying to get quantile regression estimates of my data. So far, I have found "quantreg" package to perform quantile regression, but I…
Young
  • 25
  • 4
2
votes
0 answers

Crash when too many zero in weights argument in rq function from quantreg library

I am trying to do a quantile regression with the rq function of the 'quantreg' library. I have a problem because R completely crash when I add the 'weights' argument. I added a reproducible example here: library(quantreg) prof <- seq(1,…
2
votes
0 answers

Can I obtain upper/lower bounds when running a quantile regression on a panel using the rqpd-package?

Can I obtain upper/lower bounds for my coefficients when running a quantile regression on a panel using the rqpd-package? The following is the setup (be nice, I am a beginner with R): s = as.factor(rep(1:30,rep(63,30))) s = as.matrix(s) fit =…
Oskar Ege
  • 21
  • 1
2
votes
1 answer

Access p-value from quantile regression for multiple quantiles in R

I want to access p-values of quantile regression with multiple quantiles. fit2 <- rq(speed ~ vsby_avg + snwd_avg, tau=c(.05, 0.95), data = test_data) fit2_summ <- summary(fit2) The str(fit2_summ) gives the following result List of 2 $ :List of 6 …
Pranamesh
  • 123
  • 1
  • 8
2
votes
1 answer

Quantile Regression output in LATEX using R

I have this quantile regression, with these taus:. taus <-c(.05,.10,.15,.20,.25,.30,.35,.40,.45,.50,.55,.60,.65,.70,.75,.80,.85,.90,.95) fit1_List<-list() for(i in 1:length(taus)) { fit1_List[[i]]<-rq(foodexp~xx,tau =taus[i],method="br") } I…
user4381526