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
1 answer

Quantile regression split plots

I have few years of daily rainfall data for a particular region. To get an insight of extreme rainfall events,I used quantile regression (quantreg package) in R. The plot for entire days is shown below. What I want is to split the regression line in…
ajilesh
  • 299
  • 3
  • 13
1
vote
1 answer

how to plot interaction effects from a quantile regression rq()

I want to run a quantile regression in R which includes a three-way-interaction-term with three categorical predictors at the median (tau = 0.5). To interpret the effect, I want to create a plot. For linear models I use the function effect() from…
Lena
  • 11
  • 3
1
vote
0 answers

quantreg compilation causes `libgfortran.a: can not be used when making a shared object`

This is the issue when I try to install quantreg in R, I was initially trying to install scde when I saw there was an error installing quantreg, So I am trying to install quantreg first. install.packages("quantreg") Installing package into…
Aditya2956
  • 11
  • 4
1
vote
1 answer

Building a Cumulative distribution function after Quantile Estimation

I have this data frame with two columns (Y and X). With quantreg package i can estimate the quantiles of Y conditional on X. I am unable to build CUMULATIVE density function of Y conditional on X. Can anybody help me? Estimating the…
Laorie
  • 319
  • 1
  • 7
1
vote
0 answers

Choosing correct data type for dynrq in quantreg R package

I'm trying to run a dynamic linear regression on my data: require(RCurl) y <- read.csv(text=getURL("https://raw.githubusercontent.com/zmilhard/helloworld/master/growth_data_2.csv")) explore <- y[1:87,2:21] I use three different formulas to try to…
1
vote
0 answers

Issues with rq function in R quantreg package

I need to run a dynamic linear regression of my data. My data is on the number of citations a paper has had over the last twenty years, it is cumulative. I currently have the rows being the individual papers and the columns being the years, starting…
1
vote
1 answer

Trouble installing quantreg package in Fedora

I was trying to install the AER package and quantreg is a dependency, I get the following warning and AER is not installed: Warning in install.packages : URL 'https://cran.rstudio.com/src/contrib/quantreg_5.24.tar.gz': status was '404 Not…
Gumeo
  • 891
  • 1
  • 13
  • 26
1
vote
0 answers

Update to version 3.3.0 gives problems with car and sjPlot

today I upgraded to R 3.3.0... oh boy.. wish I stayed at the previous version. The last few hours I have been trying to solve some issues to install car and sjPlot, but problems remain. When installing sjPlot everything goes fine, but when setting…
user6121484
  • 143
  • 2
  • 15
1
vote
0 answers

In R quantreg: Length of dimnames not equal to array extent

I'm new to R; trying to figure out quantreg and running into what may be a simple error. I am following, more or less exactly, the example code provided in the quantreg help file (and many other online sources), but with my data set rather than a…
herfa
  • 61
  • 2
  • 8
1
vote
1 answer

How to extract observations included in a particular quantile in quantile regression?

I have a database of ~2000 observations and made a quantile regression on the 95th percentile using quantreg package. I wanted to identify the observations that were actually used for calculating the slope and intercept for the 95th percentile…
Giuseppe Petri
  • 604
  • 4
  • 14
1
vote
0 answers

quantile regression error package AER

I used data HousePrices from package AER for running quantile regression. first i created dummies for categorical variables. then i have run basic ols regression. this is my regression: myreg1 <- lm(price ~ lotsize + lotsize^2 + bed + bath + store +…
1
vote
1 answer

Non-conformable arrays in quantile regression model from pandas DataFrame using rpy2

I am doing a quantile regression on the engel dataset with rpy2 (2.7.6): import statsmodels as sm from rpy2.robjects.packages import importr from rpy2.robjects import pandas2ri pandas2ri.activate() quantreg = importr('quantreg') data =…
pbreach
  • 16,049
  • 27
  • 82
  • 120
1
vote
1 answer

Extract coefficient with p from a quantile regression by group with dplyr

I would like to extract p-values and coefficients from a series of quantile regressions made with a grouping variable. I mostly use dplyr to manipulate data frames so a would like dplyr…
Leosar
  • 2,010
  • 4
  • 21
  • 32
1
vote
2 answers

Performing Anova on Bootstrapped Estimates from Quantile Regression

So I'm using the quantreg package in R to conduct quantile regression analyses to test how the effects of my predictors vary across the distribution of my outcome. FML <- as.formula(outcome ~ VAR + c1 + c2 + c3) quantiles <- c(0.25, 0.5,…
1
vote
3 answers

How to add a column of fitted values to a data frame by group?

Say I have a data frame like this: X <- data_frame( x = rep(seq(from = 1, to = 10, by = 1), 3), y = 2*x + rnorm(length(x), sd = 0.5), g = rep(LETTERS[1:3], each = length(x)/3)) How can I fit a regression y~x grouped by variable g and add the…
wdkrnls
  • 4,548
  • 7
  • 36
  • 64