Miscellaneous MLE

For questions regarding programming in the EViews programming language.

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

deltaD
Posts: 2
Joined: Fri Feb 19, 2016 11:27 am

Miscellaneous MLE

Postby deltaD » Fri Feb 19, 2016 11:49 am

Hi,

Could you please help me estimate via MLE the specification below? I am given only the dependent variable Y. My independent variables are separate AR(1) processes. Here it is:

@ename e1
@evar var(e1)=1

Y=c(1)+c(2)*X1(-1)+c(3)*X2(-1)+(v(-1)^(0.5))*e1
X1=c(4)*X1(-1)+c(5)*e1+c(6)*(@abs(e1)-(2/pi)^(0.5))
X2=c(7)+c(8)*X2(-1)+c(9)*e1+c(10)*(@abs(e1)-(2/pi)^(0.5))
v=(exp(X1+X2))^2

I started with sspace, but noticed that sspace works only with linear specifications. Many thanks in advance.

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

Re: Miscellaneous MLE

Postby EViews Gareth » Fri Feb 19, 2016 12:12 pm

What's the likelihood?

deltaD
Posts: 2
Joined: Fri Feb 19, 2016 11:27 am

Re: Miscellaneous MLE

Postby deltaD » Fri Feb 19, 2016 6:44 pm

Thanks a lot for your reply Gareth. The log-likelihood function is as follows:

f_t((c);X1_t,X2_t|Y_t)=-ln(2pi)-(X1_t-1+X2_t-1)-{[Y_t-c(1)-c(2)*X1_t-1-c(3)*X2_t-1]^2}/2v_t-1

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

Re: Miscellaneous MLE

Postby EViews Gareth » Mon Feb 22, 2016 9:12 am

Seems pretty easy to transform into a logl object:

Code: Select all

logl mylog mylog.append @logl logl1 mylog.append v = (@exp(x1+x2))^2 mylog.append logl1 = -(x1(-1)+x2(-1)) + (y-c(1)-c(2)*x1(-1)-c(3)*x2(-1))/(2*v(-1))

Note I see nothing here that estimates the variance term - v is fixed.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests