MLE Specification for a Binomial Density Function

For questions regarding programming in the EViews programming language.

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

rubberbob
Posts: 2
Joined: Fri Sep 17, 2010 10:20 am

MLE Specification for a Binomial Density Function

Postby rubberbob » Wed Jan 19, 2011 10:37 am

Good day Gareth,

I am trying to specify the MLE for a binomial density function of the following form (please see attachment):

in :eviews6:

where the betas are the parameters of the explanatory variables and rho is the correlation between the asset returns for two borrowers which are both random and normally distributed.

Below is some of the program that I began to write already


logl AGG_DF
AGG_DF.append @logl lklhd
AGG_DF.append res=(df-c(1)-c(2)*ir(-3)-c(3)*gdp(-3)-c(4)*infl(-2))
AGG_DF.append rho = c(5)
AGG_DF.append lklhd = @sum log(@dbinom((((res-sqrt(rho)*latent)/@sqrt(1-rho))*(((1-(res-sqrt(rho)*latent)/@sqrt(1-rho)))),acc,ba))

equation adft.ls df c ir gdp infl latent roa

!m = @ncoef
for !k = 1 to !m
c(!k) = (adft.c(!k)
next
c(5) = (adft.@cor)

AGG_DF.ml(showopts)

Issues:

(1) How to specify the OLS (adft.ls) to get the correlation for just two variables (asset returns i.e. latent and roa) so that rho is accounted for in the likelihood function?
(2) What am I doing wrong in terms of the specified likelihood function for the binomial density function above?
Attachments
Equations.doc
Equations 1 and 2
(18.5 KiB) Downloaded 176 times

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests