[R] Quantile Regression - Testing for Non-causalities in quantiles
Dear all, I am searching for a way to compute a test comparable to Chuang et al. ("Causality in Quantiles and Dynamic Stock Return-Volume Relations"). The aim of this test is to check wheter the coefficient of a quantile regression granger-causes Y in a quantile range. I have nearly computed everything but I am searching for an estimator of the density of the distribution at several points of the distribution. As the quantreg-package of Roger Koenker is also able to compute confidence intervalls for quantile regression (which also contain data concerning the estimated density) I wanted to ask wether someone could tell me if it is possible to "extract" the density of the underlying distribution by using the quantreg package. I hope my question is not to confusing, thank you very, very much in adavanve I appreciate every comment=) Cheers Stefan -- View this message in context: http://r.789695.n4.nabble.com/Quantile-Regression-Testing-for-Non-causalities-in-quantiles-tp4636511.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] quantreg Wald-Test
Dear all, I know that my question is somewhat special but I tried several times to solve the problems on my own but I am unfortunately not able to compute the following test statistic using the quantreg package. Well, here we go, I appreciate every little comment or help as I really do not know how to tell R what I want it to do^^ My situation is as follows: I have a data set containing a (dependent) vector Y and the regressor X. My aim is to check whether the two variables do not granger-cause each other in quantiles. I started to compute via quantreg for a single tau:= q: rq(Y_t~Y_(t-1)+Y_(t-2)+...+X_(t-1)+X_(t-2)+...,tau=q) This gives me the quantile regression coefficients. Now I want to check whether all the coefficients of X are equal to zero (for this specific tau). Can I do this by applying rq.anova ? I have already asked a similiar question but I am not sure if anova is really calculating this for me.. Currently I am calculating fitunrestricted=rq(Y_t~Y_(t-1)+Y_(t-2)+...+X_(t-1)+X_(t-2)+...,tau=q) fitrestrited=rq(Y_t~Y_(t-1)+Y_(t-2)+...,tau=q) anova(fitrestricted,fitunrestricted) If this is correct can you tell me how the test value is calculated in this case, or in other words: My next step is going to replicate this procedure for a whole range of quantiles (say for tau in [a,b]). To apply a sup-Wald-test I am wondering if it is correct to choose the maximum of the different test values and to simulate the critical values by using the data tabulated in Andrees(1993) (or simulate the vectors of independent Brownian Motions)...please feel free to comment, I am really looking forward to your help! Thank you very much Cheers Stefan -- View this message in context: http://r.789695.n4.nabble.com/quantreg-Wald-Test-tp4638198.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] quantreg Wald-Test
He folks, Thank you very much so far. Of course this forum is not intended to be a substitute for reading the literature, maybe I just posed the question in a way to general. I understand that rq.anovar produces the wald-test proposed in "Tests of Linear Hypotheses and L1 Estimation" (Koenker, Basset). What I do not really get is how to extend this test to the sup-Wald test proposed in "Goodness of Fit and Related Inference Processes for Quantile Regression" (Koenker, Machado). So far I do not really understand whether the anova algorithm prompts the necessary data: I want to use the Test-Statistic for different taus and afterwards choose the maximum for the values in the choosen intervall. So to make my question more straightforward: How can I get the test-value (not the p-value)? Thank you very much for your help, cheers Stefan -- View this message in context: http://r.789695.n4.nabble.com/quantreg-Wald-Test-tp4638198p4639029.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] plot(summary) quantreg - Not all outputs needed
Hi Folks, I am currently trying to present some results I obtained by using the quantreg package developed by Roger Koenker. After calculating fit<-summary(rq(Y~X1+X2, tau=2:98/100) ) the function plot(fit) presents a really nice the results by showing the values for all "regressors" in the given interval tau. But in my case, I only need the output of a single variable, say X1 and I am not interested in plotting the others. Is there a way to hide the other graphics? Thank you very much for your help, Cheers Stefan -- View this message in context: http://r.789695.n4.nabble.com/plot-summary-quantreg-Not-all-outputs-needed-tp4631184.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] R quantreg - supWald Test
He folks=) I am trying to compute a supWald Test in R, trying to show that a subset of my regressors is significantly different from 0 but I am not able to compute this test. My sample looks as follows: I am regressing fit1 <- (Y~X1+X2+X3,tau=tau). I know that if I want to show that e.g. X2 is significantly different from zero, quantreg package calculates the corresponding p-Value. But I am trying to test for the linear restriction that X2 and X3 are both different from 0. The test statistic is easy to compute, the only thing that remains is the standard error...and unfortunately I do not have a clue how to compute it as it contains a consistent estimator of the density of Y at the tau-th Quantile... Thank you very much for you help cheers Stefan -- View this message in context: http://r.789695.n4.nabble.com/R-quantreg-supWald-Test-tp4631570.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] R quantreg anova: How to change summary se-type
He folks=) I want to check whether a coefficient has an impact on a quantile regression (by applying the sup-wald test for a given quantile range [0.05,0.95]. Therefore I am doing the following calculations: a=0; for (i in 5:95/100){ fitrestricted=rq(Y~X1+X2,tau=i) tifunrestrited=rq(Y~X1+X2+X3,tau=i) a[i]=anova(fitrestricted,fitunrestricted)$table$Tn) #gives the Test-Value } supW=max(a) As anova is using the summary.rq function I want to change the Standard error method used (default: se="nid" leads to mistakes, I prefer se="ker"). Do you know how to handle this information in the anova syntax? Thank you very much Stefan -- View this message in context: http://r.789695.n4.nabble.com/R-quantreg-anova-How-to-change-summary-se-type-tp4631576.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] R quantreg - symmetry test - bootstrap SE
He folks, I want to use quantile regression for doing a test of symmetrie of a distribution. Following Buchinsky I want to test, whether the square of \tau = \beta(p)+\beta(1-p)-2*\beta(0.5) (\beta(\tau) is the estimated slope parameter for quantile \tau).Unfortunately I do not know how to implement design bootstrap matrix for calculating the standard error. Do you know if there is an existent package computing the necessesary statistics for me? Or do you have an idea how to calculate the standard error? I know that this question contains several big issues and I am very sorry that it is not possible for me to do it for my self or at least to present some parts of it...thank you very, very much for every comment! Cheers Stefan -- View this message in context: http://r.789695.n4.nabble.com/R-quantreg-symmetry-test-bootstrap-SE-tp4631662.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.