Hi Does anyone know if there is a method to calculate a goodness-of-fit statistic for quantile regressions with package quantreg? Tanks [[alternative HTML version deleted]]
In quantreg if you do FAQ() item 4 is: 4. [R^2] "I am currently trying to caculate the coefficient of determination for different quantile regression models. For example, how do you calculate the the sum of the weighted absolute deviations in the models ..." R-squared is evil, that is why there isn't an automated way to compute something similar for quantile regression in the quantreg package. But if you insist use: R1 <- 1 - f1$rho/f0$rho Provided that f0 is nested within f1 and the taus are the same, 0 <= R1 <= 1. If you want to test f1 vs f0 then use anova(f1,f0) For further details see: Koenker R. and Jose A.F. Machado. Goodness of Fit and Related Inference Processes for Quantile Regression J. of Am Stat. Assoc, (1999), 94, 1296-1310. url: www.econ.uiuc.edu/~roger Roger Koenker email rkoenker at uiuc.edu Department of Economics vox: 217-333-4558 University of Illinois fax: 217-244-6678 Urbana, IL 61801 On Apr 22, 2013, at 2:59 AM, nafiseh hagiaghamohammadi wrote:> Hi > Does anyone know if there is a method to calculate a goodness-of-fit > statistic for quantile regressions with package quantreg? > > Tanks > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Hi I fit oneĀ linear quantile regression with package quantreg and I want to khow this model is good or not.Is there method for checking it? Thanks your advice [[alternative HTML version deleted]]
> On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi > <n_hajiaghamohammadi2007 at yahoo.com> wrote: >> Hi >> >> I fit one linear quantile regression with package quantreg and I want to >> khow this model is good or not.Is there method for checking it? >> Thanks your advice> I ask this question because there is 2 models,f0 and f1 in (R1 <- 1 - > f1$rho/f0$rho ), > is it true? > > but I fit 1 model and I want to check goodness of fit for 1 model . > >Please keep your responses on list so you can get a quick reply even when I'm otherwise busy. I think you could -- for a rough and ready comparison -- compare against a constant (empirical quantile) model (not unlike how basic OLS models compare against the constant mean predictor) but someone else might know if there's any subtleties about quantile regression that should be noted here. MW
good usually means good relative to something else, in this case the comparison seems, as Michael has already said, f0 <- rq(y ~ 1, tau = ?) and then one can compute the R1 version that I originally suggested. But since there is still no explicit way to evaluate this, it is all a bit pointless. Roger Koenker rkoenker at illinois.edu On Apr 24, 2013, at 6:37 PM, R. Michael Weylandt wrote:>> On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi >> <n_hajiaghamohammadi2007 at yahoo.com> wrote: >>> Hi >>> >>> I fit one linear quantile regression with package quantreg and I want to >>> khow this model is good or not.Is there method for checking it? >>> Thanks your advice > >> I ask this question because there is 2 models,f0 and f1 in (R1 <- 1 - >> f1$rho/f0$rho ), >> is it true? >> >> but I fit 1 model and I want to check goodness of fit for 1 model . >> >> > > Please keep your responses on list so you can get a quick reply even > when I'm otherwise busy. > > I think you could -- for a rough and ready comparison -- compare > against a constant (empirical quantile) model (not unlike how basic > OLS models compare against the constant mean predictor) but someone > else might know if there's any subtleties about quantile regression > that should be noted here. > > MW > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.