help for the FMOLS prg

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

theologos
Posts: 25
Joined: Wed Mar 11, 2009 6:09 am

help for the FMOLS prg

Postby theologos » Thu Jul 02, 2009 4:09 am

Hi,

I have downloaded it the Fully Modified OLS prg file, from the program repository and I do not know how I should modify the call command in order to get results. As an example I have used a dependent variable along with three independent variables. I would be grateful if you could provide me with any help!

Thank you in advance.
Last edited by theologos on Fri Sep 04, 2009 2:25 am, edited 1 time in total.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: help for the FMOLS prg

Postby EViews Glenn » Thu Jul 02, 2009 1:05 pm

From the comments in the program...(with one minor correction)

' smpl @all
' scalar bw = 7
' group g x1 x2 x3
' vector b
' vector ses
' sym cov
' call fmols(y, g, bw, b, ses, cov)
' vector tstats = @ediv(b, ses)

The first two lines set the sample and the bandwidth. The group specification defines the set of nonstationary regressors. Declare a vector for coefficients, vector for the ses, and a sym for the covariance matrix. Call FMOLS using the dependent, the group, the bandwidth scale, the vectors for output and the sym for output.

theologos
Posts: 25
Joined: Wed Mar 11, 2009 6:09 am

Re: help for the FMOLS prg

Postby theologos » Fri Jul 03, 2009 2:57 am

Hello,

Thank you for your immediate response! I have incorporated the minor revision you have suggested and it works! Ι was careless regarding the substitution of the vector named tstats with ses! I should have noticed it.

Thank you again!

regards

Anne
Posts: 2
Joined: Tue Jun 23, 2009 9:52 am

help for the FMOLS prg

Postby Anne » Thu Sep 03, 2009 1:15 pm

Hello,

I have used in Eviews 6 Pedroni's panel cointegration test to check whether there is a long-run relationship between a sustainable development index and 4 explanatory variables for 10 countries between 1995-2006 (annual data). According to the output provided by the test, I found that the variables are cointegrated with the option intercept and trend. As a result, I've tried to perform a FMOLS regression using the prg file posted by QMS Glenn on this forum.

Trying to understand the code, I met some difficulties. Therefore, I kindly ask you to tell me why the scalar bw is set at 7 (would this value be appropriate for my sample?)

e.g. scalar bw = 7
Moreover, I would like to know whether the t-stat provided by the program follow a standard normal distribution.

Thanks a lot in advance!

Anne

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: help for the FMOLS prg

Postby EViews Glenn » Tue Sep 08, 2009 9:18 am

The 7 is an arbitrarily chosen bandwidth that may not be appropriate for your data. The choice of bandwidth is something you will have to decide for yourself.

The distribution of the coefficients is non-standard, but the t-statistics may be used for inference in the usual fashion.

avaona
Posts: 2
Joined: Wed Jun 08, 2011 1:13 am

Re: help for the FMOLS prg

Postby avaona » Wed Jun 08, 2011 1:32 am

I am using the program FMOLS prg downloaded from eviews repository with e-views 6. I was wondering whether the program already includes individual specific intercepts and trends or whether one has to insert them as variables in the group g. Thank you for your help. Andrea.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: help for the FMOLS prg

Postby EViews Glenn » Wed Jun 08, 2011 12:17 pm

It doesn't handle any panel structures. Note that you will have problems with lags in the long-run variance calculation if you try to run this with panel data...

avaona
Posts: 2
Joined: Wed Jun 08, 2011 1:13 am

Re: help for the FMOLS prg

Postby avaona » Thu Jun 30, 2011 4:49 am

Hi,
thank you for your reply.

I understand it does not per se handle any panel structure. However, Pedroni (2001), Purchasing power parity tests in cointegrated panels, Review of Economics and Statistics, 83, 727-731, proposes a mean group FMOLS. Point estimates are easy to obtain as they are just the mean of the point estimates of each cross-section (see the first column of p. 729). My problem is with the t-statistics. In the fourth equation of p. 729, there is written that the relevant t-statistics are weighted averages of the individual specific ones. Regarding these, they are the product of two terms. The first one is the difference between the individual FMOLS point estimates and the value of the coefficients under the null. The second one is the square root of the product of the sum of the squared deviations of the relevant regressor from its cross-sectional mean times an omega term. My problem is where can I get the omega term from the file FMOLS.prg?

Hope I made myself clear. Thank you for your help.

Best,
Andrea.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: help for the FMOLS prg

Postby EViews Glenn » Thu Jun 30, 2011 3:31 pm

I believe it's in the first element of the Omega matrix in the subroutine: omega(1,1). Unfortunately, you don't have access to it as the subroutine is currently written. You'll have to modify the definition of the subroutine so that the value is returned when you call the routine.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests