Robustreg

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

EViews Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: Robustreg

Postby EViews Esther » Fri Sep 09, 2011 4:25 pm

Could you upload your workfile? Let me figure out the problem.

esquivelmm
Posts: 9
Joined: Thu Jul 21, 2011 3:07 pm

Re: Robustreg

Postby esquivelmm » Wed Sep 14, 2011 3:24 pm

This is the workfile
26_5.WF1
(67.89 KiB) Downloaded 480 times
. 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 Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: Robustreg

Postby EViews Esther » Thu Sep 15, 2011 11:01 am

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).

esquivelmm
Posts: 9
Joined: Thu Jul 21, 2011 3:07 pm

Re: Robustreg

Postby esquivelmm » Tue Sep 20, 2011 10:27 am

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!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: Robustreg

Postby EViews Gareth » Tue Sep 20, 2011 12:35 pm

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).
Follow us on Twitter @IHSEViews

esquivelmm
Posts: 9
Joined: Thu Jul 21, 2011 3:07 pm

Re: Robustreg

Postby esquivelmm » Mon Feb 06, 2012 11:49 am

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.

EViews Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: Robustreg

Postby EViews Esther » Mon Feb 06, 2012 12:54 pm

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).

esquivelmm
Posts: 9
Joined: Thu Jul 21, 2011 3:07 pm

Re: Robustreg

Postby esquivelmm » Wed Feb 08, 2012 10:50 am

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 Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: Robustreg

Postby EViews Esther » Wed Feb 08, 2012 11:14 am

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).

Nass
Posts: 1
Joined: Fri Mar 15, 2013 9:14 pm

Re: Robustreg

Postby Nass » Fri Mar 15, 2013 9:27 pm

Hi,

When using the default setting in this add-in, what is covariance estimator utilized to calculate the t-statistics in the output?

Thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13305
Joined: Tue Sep 16, 2008 5:38 pm

Re: Robustreg

Postby EViews Gareth » Sun Mar 17, 2013 12:34 am

The documentation has a pretty clear description of the standard error calculations.
Follow us on Twitter @IHSEViews


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 19 guests