LOT model (Logl with 3 regions)

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Ptysa
Posts: 3
Joined: Thu Aug 11, 2011 2:09 pm

LOT model (Logl with 3 regions)

Postby Ptysa » Thu Aug 11, 2011 11:50 pm

Hello... new with Eviews (I use version 5) and in a hurry (always), I'm trying hard to get a max of it but still hardly find the way to conclude.

I have the following model* to maximize in order to estimate a and b, (Rj and Rm being known...)

I also have the distribution of the three regions 0, 1 and 2 under the form of interdependent dummy variables e0, e1, e2, verifying for each observation e0 + e1 + e2 = 1

Image

so... I upload in Eviews work file my data Ri, Rm, e0, e1, e2 and try to create my LogLikelihood object, and then it becomes suddenly a bit more tricky... Here is what I have done so far (you may laugh... ):

' RI return of stock i (daily time series)
' RM market return (market index) (idem)
' A1 ask price =c(1) A2 bid price =c(2) BETA =c(3)

SIGMA2=c(4)

' == Multinomial log likelihood with 3 outcomes ==
' frequency of outcomes is available in series E1 E2 E3 available in binar format (1-applicable 0-ignore) with


@logl EQN

RES1= RI + c(1) - c(3)*RM
RES2= RI + c(2) - c(3)*RM
RES0=(@DNORM(RES2))-(@DNORM(RES1))

LG_E1 = LOG(@DNORM(RES1/@SQRT(SIGMA2)))-LOG(SIGMA2)/2
LG_E2 = LOG(@DNORM(RES2/@SQRT(SIGMA2)))-LOG(SIGMA2)/2
LG_E0 = LOG(RES0)

EQN= E1*LG_E1 + E2*LG_E2 + E0*LG_E0



But apparently, that's not the way it shall be done... I might have to introduce @deriv tags but don't really understand how I should make it...
Thanks for your patience and kindness, if this problem is a piece of cake to you...



* this is the Lesmond Ogden Trzcinka (1999) Limited Dependant Variable model for transactions cost estimation
Last edited by Ptysa on Sat Aug 13, 2011 3:19 am, edited 1 time in total.

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

Re: LOT model (Logl with 3 regions)

Postby EViews Glenn » Fri Aug 12, 2011 10:50 am

So what problems are you having?

The notation in the equations is kind of funny with symbols from the first equation changing in the second (e.g., R -> rho?).

I assume that Phi2 and Phi1 are both CDFs of the normal, but then why do they have different subscripts for the two?

I will note that you appear to be using @dnorms for these instead of @cnorms, but perhaps I just don't understand the model.

Ptysa
Posts: 3
Joined: Thu Aug 11, 2011 2:09 pm

Re: LOT model (Logl with 3 regions)

Postby Ptysa » Sat Aug 13, 2011 4:27 am

Yes, notation changes.. but that was just the background to explain my issue, and you're right, I should use a cumulative dist function (thanks for pointing this issue... revealing my overall level...).

My problem is to write the correct Log Likelihood object in Eviews language in order to maximize estimate alpha1 and alpha2...

and what I've done so far trying to find analogies with other examples available in this forum and the guide remain apparently meaningless to Eviews who invariably answers to my attempts that it"s "missing values in @LogL series at current coefficients at observation (first day)"... Since my data are all correctly displayed, I conclude that something is not written correctly in the following blue equation... and I can't understand what... Here is my last attempt

' A1 ask price =c(1) A2 bid price =c(2) BETA =c(3) SIGMA2=c(4)
' frequency of 3 outcomesare e1 e2 e0 available in binar format (1-applicable 0-ignore)

' Three components of the Logl function:
' eqn1: (applies where e1=1) LOG(@CNORM((RI + c(1) - c(3)*RM)/@SQRT(c(4))))-LOG(c(4))/2
' eqn2: (applies where e2=1) LOG(@CNORM((RI + c(2) - c(3)*RM)/@SQRT(c(4))))-LOG(c(4))/2
' eqn0: (applies where e0=1) LOG((@CNORM(RI + c(2) - c(3)*RM))-(@CNORM(RI + c(1) - c(3)*RM)))
' >>>>>>> EQN= E1*eqn1 + E2*eqn2 + E0*eqn0



@logl EQN

EQN = e1*(LOG(@CNORM((RI + c(1) - c(3)*RM)/@SQRT(c(4))))-LOG(c(4))/2) + e2*(LOG(@CNORM((RI + c(2) - c(3)*RM)/@SQRT(c(4))))-LOG(c(4))/2) + e0*(LOG((@CNORM(RI + c(2) - c(3)*RM))-(@CNORM(RI + c(1) - c(3)*RM))))


Thanks Glenn for your previous answer

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

Re: LOT model (Logl with 3 regions)

Postby EViews Glenn » Mon Aug 15, 2011 11:57 am

The missings might be from you taking a log or sqrt of a zero at starting values. I didn't see anything else that was wrong at first glance (though I admit that I didn't look at your specification *that* carefully).

What you might want to do is to look at the parts of the subexpressions to see what evaluations might be causing problems.

Note that you take a log of the @cnorm of

Code: Select all

RI + c(1) - c(3)*RM
I'd start with looking at that.

The @sqrt and log of c(4) are the other two things that obviously may be an issue.

Ptysa
Posts: 3
Joined: Thu Aug 11, 2011 2:09 pm

Re: LOT model (Logl with 3 regions)

Postby Ptysa » Sun Aug 28, 2011 9:33 am

Thanks a lot for your help. I couldn't manage and chose another method.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 1 guest