Robustreg
Moderators: EViews Gareth, EViews Moderator, EViews Esther
-
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Robustreg
Could you upload your workfile? Let me figure out the problem.
-
- Posts: 9
- Joined: Thu Jul 21, 2011 3:07 pm
Re: Robustreg
This is the workfile
robustreg r c dif dif(-1)
robustreg r c dif dif(-1) dif(-2)
robustreg r c dif dif(-1) dif(-2) dif(-3)
robustreg r c dif dif(-1) dif(-2) dif(-3) dif(-4)
robustreg r c dif dif(-1) dif(-2) dif(-3) dif(-4) dif(-5)
As I wrote, I receive the “_SE01 is not defined” message in the 1min and 5min cases, no problems with the 10min and 15min cases.
. For each frequency (note that I have a different page for each frequency: 1min, 5min,…)my regressions should take the following form: robustreg r c dif dif(-1)
robustreg r c dif dif(-1) dif(-2)
robustreg r c dif dif(-1) dif(-2) dif(-3)
robustreg r c dif dif(-1) dif(-2) dif(-3) dif(-4)
robustreg r c dif dif(-1) dif(-2) dif(-3) dif(-4) dif(-5)
As I wrote, I receive the “_SE01 is not defined” message in the 1min and 5min cases, no problems with the 10min and 15min cases.
-
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Robustreg
Please reinstall the new *robustreg* addin which contains an additional error message.
Given an ordinary robust regression model, y = Xb + sigma*error, one should calculate the estimates of b and sigma for a fixed number of iterations or until convergence.
However, when a reasonable estimate of sigma is not available, we will see a popup error message as follows:
"Cannot calculate reasonable covariance estimate - please choose a different weight function."
In your example, Bisquare (default setting) weight function could not give you the reasonable estimate of sigma.
I suggest you to choose different weight functions such as OLS, Cauchy, and/or Fair (Please note that the documentation explains alternative weight functions).
Given an ordinary robust regression model, y = Xb + sigma*error, one should calculate the estimates of b and sigma for a fixed number of iterations or until convergence.
However, when a reasonable estimate of sigma is not available, we will see a popup error message as follows:
"Cannot calculate reasonable covariance estimate - please choose a different weight function."
In your example, Bisquare (default setting) weight function could not give you the reasonable estimate of sigma.
I suggest you to choose different weight functions such as OLS, Cauchy, and/or Fair (Please note that the documentation explains alternative weight functions).
-
- Posts: 9
- Joined: Thu Jul 21, 2011 3:07 pm
Re: Robustreg
Thanks, I downloaded and installed the new add-in and I try other weight functions as you suggested. It seems to be working fine.
Now, given that the procedure stops when a reasonable estimate of sigma is not available, how will it be possible not to stop a program that includes robust regression estimation that might be affected by that issue? In other words, will it be possible to instruct eviews that when the robust regression add in does not find a reasonable estimation of sigma by using the default weight function (Bisquare) it should try again for example by using OLS weight function so that the whole program does not stop?
Thanks!
Now, given that the procedure stops when a reasonable estimate of sigma is not available, how will it be possible not to stop a program that includes robust regression estimation that might be affected by that issue? In other words, will it be possible to instruct eviews that when the robust regression add in does not find a reasonable estimation of sigma by using the default weight function (Bisquare) it should try again for example by using OLS weight function so that the whole program does not stop?
Thanks!
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13305
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Robustreg
Given the way that this, (and all current) add-in works, no. As soon as an error message is encountered, the add-in simply issues a stop command and the program will stop.
You could edit the add-in so that it doesn't stop (just search for the error message and remove the stop command), and then add your own code so that it does whatever you want to happen (it could, for example, create some scalar in your workfile, and then your calling program could check that scalar to see if an error has occurred).
You could edit the add-in so that it doesn't stop (just search for the error message and remove the stop command), and then add your own code so that it does whatever you want to happen (it could, for example, create some scalar in your workfile, and then your calling program could check that scalar to see if an error has occurred).
Follow us on Twitter @IHSEViews
-
- Posts: 9
- Joined: Thu Jul 21, 2011 3:07 pm
Re: Robustreg
Hello, now I have two questions about the content of the document in which you explain how the IRLS add-in works in eviews. When you explain the algorithm you mention:
“Calculate the estimate of the scale Sigma_MAD = Median(|yk – x’kB|)/0.6745 for k=p,…n”
My question is why the alternative values of k start in p and not in 1?
Then, in the step 2 of the algorithm you say: “Form the residual ri = (yi – x’iB)/ Sigma_MAD*(1-hi)^0.5 where c is a tuning constant”
The thing is that I don´t see any c tunning constant in the expression.
Thanks in advance for your help.
“Calculate the estimate of the scale Sigma_MAD = Median(|yk – x’kB|)/0.6745 for k=p,…n”
My question is why the alternative values of k start in p and not in 1?
Then, in the step 2 of the algorithm you say: “Form the residual ri = (yi – x’iB)/ Sigma_MAD*(1-hi)^0.5 where c is a tuning constant”
The thing is that I don´t see any c tunning constant in the expression.
Thanks in advance for your help.
-
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Robustreg
esquivelmm wrote:When you explain the algorithm you mention:
“Calculate the estimate of the scale Sigma_MAD = Median(|yk – x’kB|)/0.6745 for k=p,…n”
My question is why the alternative values of k start in p and not in 1?
It implies that the smallest p absolute deviations are excluded when computing the median. It would be helpful to note that k starts in p because X becomes n-by-(p+1) when the constant term (a vector of ones) is included.
esquivelmm wrote:Then, in the step 2 of the algorithm you say: “Form the residual ri = (yi – x’iB)/ Sigma_MAD*(1-hi)^0.5 where c is a tuning constant”
The thing is that I don´t see any c tunning constant in the expression.
A tuning constant c is for the weight function in Step 3. Specific tuning values are given in the Table (page 3).
-
- Posts: 9
- Joined: Thu Jul 21, 2011 3:07 pm
Re: Robustreg
EViews Esther wrote:esquivelmm wrote:When you explain the algorithm you mention:
“Calculate the estimate of the scale Sigma_MAD = Median(|yk – x’kB|)/0.6745 for k=p,…n”
My question is why the alternative values of k start in p and not in 1?
EViews Esther wrote:It implies that the smallest p absolute deviations are excluded when computing the median. It would be helpful to note that k starts in p because X becomes n-by-(p+1) when the constant term (a vector of ones) is included.
I may be wrong, but then if the smallest p abolute deviations are excluded, it will remain only n-p ordered values (or n-(p+1) if there is a constant). The document says "...where |Yk-x'kB|is the largest n+p-1 ordered values of..."
Last edited by esquivelmm on Wed Feb 08, 2012 11:29 am, edited 1 time in total.
-
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Robustreg
My bad. You are right.
esquivelmm wrote:if the smallest p abolute deviations are excluded, it will remain only n-p ordered values (or n-(p+1) if there is a constant).
Re: Robustreg
Hi,
When using the default setting in this add-in, what is covariance estimator utilized to calculate the t-statistics in the output?
Thanks
When using the default setting in this add-in, what is covariance estimator utilized to calculate the t-statistics in the output?
Thanks
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13305
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Robustreg
The documentation has a pretty clear description of the standard error calculations.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 19 guests