Search found 13 matches

by freedomplaza
Fri Sep 09, 2016 5:48 am
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Re: Which matrix is near singular?

Soory didn't notice your response on page 2 of the thread...

Ideally 2-step optimal weighting. For starters, getting results with an identity weighting matrix would be a success.
by freedomplaza
Thu Sep 08, 2016 1:04 pm
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Re: Which matrix is near singular?

The GMM is based on the following moment conditions 1/T*sum_{t=1}^{t} exp{m_1t} * exp(r_t} = 0 1/T*sum_{t=1}^{t} (m_1t - m_2t)^2 -fx^2 = 0 where m_1t and m_2t are defined in the Eviews file that I attached in one of my previous messages. They are a function of the parameters that I want to estimate....
by freedomplaza
Thu Sep 08, 2016 12:37 pm
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Re: Which matrix is near singular?

Dear Eviews Glenn, thanks for your reply. To answer your first question: in Matlab, I am estimating a GMM, which is my ultimate goal. The 2SLS discussion is an unwanted detour, which is due to Eviews insisting on calculating the first step estimates in the GMM as a 2SLS. I do not care about the 2SLS...
by freedomplaza
Thu Sep 08, 2016 5:55 am
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Re: Which matrix is near singular?

I have tried doing this in Matlab and everything works perfectly. I think it is a bug with Eviews. It gets stuck in an incorrect initial estimation of the coefficients using 2SLS (however defined), which drives the coefficients to infinity, blowing up the variance-covariance matrix. It is very disap...
by freedomplaza
Wed Sep 07, 2016 6:58 pm
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Re: Which matrix is near singular?

I am attaching my workfile. The system that I am trying to estimate via GMM (let's say with identity weighting matrix to simplify things) is in "model1". The system contains two moment conditions (both ending with an "=0" and separated by a blank line) and two coefficients, c(1) ...
by freedomplaza
Wed Sep 07, 2016 6:13 pm
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Re: Which matrix is near singular?

That's exactly my point: if Z is a vector of ones, then this should yield exactly the same results as simple OLS. I am afraid that there is a bug in the software.
by freedomplaza
Wed Sep 07, 2016 5:00 pm
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Re: Which matrix is near singular?

Do you know what are the objective functions in the 2 stages of the 2SLS? I could not find any documentation about this in a GMM context other than for the case in which the set of moments restrictions is linear. Is there a way of forcing Eviews to look for the minimum of the GMM objective function ...
by freedomplaza
Wed Sep 07, 2016 2:50 pm
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Re: Which matrix is near singular?

I think you need at least as many moments conditions as parameters. With 2 Euler equations, I can estimate up to 2 parameters.
by freedomplaza
Wed Sep 07, 2016 11:50 am
Forum: Estimation
Topic: Which matrix is near singular?
Replies: 17
Views: 18117

Which matrix is near singular?

I have a basic question. I am trying to estimate a system of nonlinear equations. The equations are actually Euler equations of the type E[M*R]-1=0, where M is the stochastic discount factor, which is itself a nonlinear function of the parameters that I would like to estimate. Suppose that I am usin...
by freedomplaza
Tue May 31, 2016 4:50 pm
Forum: Programming
Topic: Call a subroutine after an "append" command
Replies: 6
Views: 6917

Re: Call a subroutine after an "append" command

So, I think that the issue that I am having is that my strings (defined as %stringname="...") are too long. I guess that the size limit for a string is 1000 characters: any way of increasing that or getting around this issue?
by freedomplaza
Tue May 31, 2016 2:39 pm
Forum: Programming
Topic: Call a subroutine after an "append" command
Replies: 6
Views: 6917

Re: Call a subroutine after an "append" command

So, I have followed your suggestion (thanks for that) and defined strings in the subroutine (outside of my main program) that are then invoked in the main program and appended as moment conditions for the GMM (which helps keeping my main program tidy). The issue that I am facing now is the following...
by freedomplaza
Tue May 31, 2016 8:28 am
Forum: Programming
Topic: Call a subroutine after an "append" command
Replies: 6
Views: 6917

Re: Call a subroutine after an "append" command

The command "model1.append..." is issued inside a program that is supposed to populate a system to be estimated via GMM. The system "model1" consists of many moments conditions of the form "object1*object2=0", "object1*object3=0",... where "object1",...
by freedomplaza
Tue May 31, 2016 8:05 am
Forum: Programming
Topic: Call a subroutine after an "append" command
Replies: 6
Views: 6917

Call a subroutine after an "append" command

I need to call a subroutine right after a system "append" command. Here is a minimal example model1.append call mysub '====== subroutine mysub %temp="c(1)" endsub The result that I end up getting when I open "model1" is that it contains a line that reads "call mysu...

Go to advanced search