quantile regression
Moderators: EViews Gareth, EViews Moderator

 Posts: 9
 Joined: Sun Feb 23, 2014 4:18 pm
quantile regression
hey eviews users,
i wonder if i could perform a quantile regression in eviews 5 , if anyone of you knows how please help !
best regards
i wonder if i could perform a quantile regression in eviews 5 , if anyone of you knows how please help !
best regards

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11368
 Joined: Tue Sep 16, 2008 5:38 pm
Re: quantile regression
No. You'll have to upgrade to a more recent version.
Follow us on Twitter @IHSEViews

 Posts: 9
 Joined: Sun Feb 23, 2014 4:18 pm
Re: quantile regression
thank you for answering , i'm actually trying to purshase the 7th version . but could you please tell me how to run it , i have to get the quantiles for the highest and lowest values, i'm working on the following model
i'm having real problems estimating it , i would really appreciate it if somebody could help, i can't estimate the seconde equation !
best regards
i'm having real problems estimating it , i would really appreciate it if somebody could help, i can't estimate the seconde equation !
best regards

 EViews Developer
 Posts: 2548
 Joined: Wed Oct 15, 2008 9:17 am
Re: quantile regression
I'm not sure I understand what you want to do [let me amend that, "I'm certain that I don't understand what you want to do."]. What quantiles do you want to compute? Do you just want raw quantiles or do you want to do quantile estimation? As to estimating the second equation, it would help if you defined what your terms are and how you want to do the estimation.

 Posts: 9
 Joined: Sun Feb 23, 2014 4:18 pm
Re: quantile regression
Thank you soo much Glenn for answering i really appreciated it !
well here's what i want to do , i'm trying to analyse the relation between gold and stock return and i want to do it as presented in the three equations model, the first equation represents the simple regression of gold prices on stock prices,in the seconde equation in wish i have the problem , i must calculate the 10%, 5% and 1% quantile of the return distribution, and the D letters stands for the dummy variables, which equal to 1 if the stock return exceeds the threshold given by the quantiles and equal to 0 otherwise.and for the third equation is a GARCH(1,1) model. this three equation must be later simultaneously estimated using the maximum likelihood methods. but my problem is with the second equation i would appreciat if you could help me with it !
best regards!
well here's what i want to do , i'm trying to analyse the relation between gold and stock return and i want to do it as presented in the three equations model, the first equation represents the simple regression of gold prices on stock prices,in the seconde equation in wish i have the problem , i must calculate the 10%, 5% and 1% quantile of the return distribution, and the D letters stands for the dummy variables, which equal to 1 if the stock return exceeds the threshold given by the quantiles and equal to 0 otherwise.and for the third equation is a GARCH(1,1) model. this three equation must be later simultaneously estimated using the maximum likelihood methods. but my problem is with the second equation i would appreciat if you could help me with it !
best regards!

 EViews Developer
 Posts: 2548
 Joined: Wed Oct 15, 2008 9:17 am
Re: quantile regression
Generate the dummy variables and then use them in the equation
Note that those are all of the low quantiles.
Lastly, this isn't quantile regression, which is what Gareth thought you were asking about. The dependent variable is not the quantile of a variable.
Code: Select all
series d10 = rstock>@quantile(rstock, .1)
series d05 = rstock>@quantile(rstock, .05)
series d01 = rstock>@quantile(rstock, .01)
Note that those are all of the low quantiles.
Lastly, this isn't quantile regression, which is what Gareth thought you were asking about. The dependent variable is not the quantile of a variable.

 Posts: 9
 Joined: Sun Feb 23, 2014 4:18 pm
Re: quantile regression
Thank you very much Glenn , you have no idea how much you helped me , sorry if i didn't specify the problem as it should !
this is exactly what i was looking for ! one last question if i may ; i have to tell you that the bt parameter is modelled in the second equation as a dynamique process !i wonder how i can handle it! should i regress bt on c and the three dummy variables ? is that possible ? cuz bt is a parameter of the first equation it's the first time i come across such a situation!!!
Thank youuu
this is exactly what i was looking for ! one last question if i may ; i have to tell you that the bt parameter is modelled in the second equation as a dynamique process !i wonder how i can handle it! should i regress bt on c and the three dummy variables ? is that possible ? cuz bt is a parameter of the first equation it's the first time i come across such a situation!!!
Thank youuu

 EViews Developer
 Posts: 2548
 Joined: Wed Oct 15, 2008 9:17 am
Re: quantile regression
Since bt has no stochastics, just expand out the product and write the regressors in terms of the expanded terms.
No that I actually look your third equation, it looks like you want to enter this spec into the GARCH estimator.
Code: Select all
rgold = c(1) + c(2)*rstock + c(3)*d10*rstock + c(3)*d05*rstock + c(4)*d01*rstock
No that I actually look your third equation, it looks like you want to enter this spec into the GARCH estimator.

 Posts: 9
 Joined: Sun Feb 23, 2014 4:18 pm
Re: quantile regression
thank you for your answer,
i didn't get what you meant by your last sentence , what i need to do is to jointly estimate the three equations using the maximum likelihood method, i had a problem with the estimation of the second cuz i didn't know the exact code in eviews, which is no longer the case thanks to your valuable help! i hope that i answered your last remark! if not , would you please explain !
i didn't get what you meant by your last sentence , what i need to do is to jointly estimate the three equations using the maximum likelihood method, i had a problem with the estimation of the second cuz i didn't know the exact code in eviews, which is no longer the case thanks to your valuable help! i hope that i answered your last remark! if not , would you please explain !

 EViews Developer
 Posts: 2548
 Joined: Wed Oct 15, 2008 9:17 am
Re: quantile regression
What I meant was that the third equation looks like a GARCH(1, 1) variance specification (note that there is no error term). So ML on the entire set of three equations probably can be performed by entering in the expanded first equation that we discussed earlier into the EViews single equation ARCH estimator (assuming normality).
At least that's what it looks like from this vantage...
At least that's what it looks like from this vantage...

 Posts: 9
 Joined: Sun Feb 23, 2014 4:18 pm
Re: quantile regression
Thank you Glen for your always valuable answers !
yeah the third equation is a GARCH(1,1) ,are you suggestion that instead of the ML i should run a garch regression of the expanded equation you post earlier ? as i have read i beleive the three equation should be regressed using the ML however i would appreciat if you could tell what is your suggestion by posting the entire code of how you think it should be done.so that i can understand what you mean exactly .
yeah the third equation is a GARCH(1,1) ,are you suggestion that instead of the ML i should run a garch regression of the expanded equation you post earlier ? as i have read i beleive the three equation should be regressed using the ML however i would appreciat if you could tell what is your suggestion by posting the entire code of how you think it should be done.so that i can understand what you mean exactly .

 EViews Developer
 Posts: 2548
 Joined: Wed Oct 15, 2008 9:17 am
Re: quantile regression
EViews GARCH estimation does estimate ML on the specification. You should take a look at the detailed chapter on GARCH estimation in the EViews manual. As I said, I believe that you should be able to enter the expanded expression above for the conditional mean equation directly into the dialog and specify a GARCH(1,1) model.

 Posts: 9
 Joined: Sun Feb 23, 2014 4:18 pm
Re: quantile regression
Thank you Glenn you have made my day, thanks to you i get it Now. i really apprceiated it from you !
Re: quantile regression
Hi Glen and ThePhoenix or anyone who can help me a bit.
I see that you have been doing the same regression as I am doing now but I am not able to get so much results with sense or significance, could be due to my data but I think I am just lacking some skills to use EViews, thus I would be very thankful to get at least some answers to the questions presented.
1.Is the code used to create dummy variables for the lower quantiles right or should the ">" be "<" to have the lower quantiles to have values of 1 or am I missing something crusial here. I am trying to do the regression with the lowest 1,5,10 percentage values of the stock index.
2.Should the code posted above only be posted to the "Mean equation" on equation estimation and then just use the GARCH/TARCH model with 1,1 and leave the variance regressors empty and then run it? Or should the quantile dummys go to the variance regressors section and then run it?
3.This might be a very simple minded question but I have to ask. When I use the equation with gold I get significant results showing negative value for 10% but positive for 5%, is this really logical? Also when I use it to my industrial metal(palladium) i get a negative coefficient for 5% which should be impossible because palladium is somewhat highly correlated to stocks(although this is not anywhear near significance).
4.With gold I do not get anywhere significant coefficient for the stocks variable of the sample but some significance values for the dummy variables, shouldn't it be logical to have this other way around?
I would be very grateful if someone would have any time to answer these questions or any of these, even if these could sound very dumb beginner questions. I have already read the eviews manual and looked at videos of the subject without solving the problem, also the study im doing is very important for me, thus I would want to be sure for the results to be right.
I see that you have been doing the same regression as I am doing now but I am not able to get so much results with sense or significance, could be due to my data but I think I am just lacking some skills to use EViews, thus I would be very thankful to get at least some answers to the questions presented.
1.Is the code used to create dummy variables for the lower quantiles right or should the ">" be "<" to have the lower quantiles to have values of 1 or am I missing something crusial here. I am trying to do the regression with the lowest 1,5,10 percentage values of the stock index.
2.Should the code posted above only be posted to the "Mean equation" on equation estimation and then just use the GARCH/TARCH model with 1,1 and leave the variance regressors empty and then run it? Or should the quantile dummys go to the variance regressors section and then run it?
3.This might be a very simple minded question but I have to ask. When I use the equation with gold I get significant results showing negative value for 10% but positive for 5%, is this really logical? Also when I use it to my industrial metal(palladium) i get a negative coefficient for 5% which should be impossible because palladium is somewhat highly correlated to stocks(although this is not anywhear near significance).
4.With gold I do not get anywhere significant coefficient for the stocks variable of the sample but some significance values for the dummy variables, shouldn't it be logical to have this other way around?
I would be very grateful if someone would have any time to answer these questions or any of these, even if these could sound very dumb beginner questions. I have already read the eviews manual and looked at videos of the subject without solving the problem, also the study im doing is very important for me, thus I would want to be sure for the results to be right.

 EViews Developer
 Posts: 2548
 Joined: Wed Oct 15, 2008 9:17 am
Re: quantile regression
1. Yes, < will give those observations that are in the tails. You can look at the generated series to verify for yourself.
2. Depends on how you want to use the quantiles. Do you believe they affect the mean or variance (or both).
3. That's really for you to interpret.
4. That's really for you to interpret.
2. Depends on how you want to use the quantiles. Do you believe they affect the mean or variance (or both).
3. That's really for you to interpret.
4. That's really for you to interpret.
Return to “EViews 5 and Earlier”
Who is online
Users browsing this forum: No registered users and 2 guests