Vuong test using Eviews

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

propau
Posts: 1
Joined: Thu Dec 10, 2009 3:47 am

Vuong test using Eviews

Postby propau » Thu Dec 10, 2009 4:06 am

Hi guys,

can somebody please help me on the following issue? I am trying to calculated the Vuong test statistic for comparing two non-nested models (simple linear models). Here is what I came up with:

model (1) = eq_cfo1_ni_w
model (2) = eq_cfo1_ci_w

series xb21 = eq_cfo1_ni_w.c(1)+eq_cfo1_ni_w.c(2)*ni_w
series logl21 = (cfo_t_1_w>0)*log( @cnorm(xb21) ) + (cfo_t_1_w=0)*log( 1-@cnorm(xb21))
series lam22 = eq_cfo1_ci_w.c(1)+eq_cfo1_ci_w.c(2)*ci_w
series logl22 = (cfo_t_1_w>0)*log( @cnorm(lam22) ) + (cfo_t_1_w=0)*log( 1-@cnorm(lam22))
series m = logl21-logl22

table vuong
setcolwidth(vuong,1,20)
vuong(1,1) = "Vuong non-nested LR test"
vuong(2,1) = "basic model if v>2; alternative model if v<2; else inconclusive"
scalar v = @sum(m)/@sqrt( @sumsq(m-@mean(m)) )
vuong(3,1) = "v = " + @str(v)
show vuong

I am not quite sure with regard to the following two things:
1. Do you think the calculation is right ( I adjusted it from http://www.uibk.ac.at/econometrics/dl/logl.html --> zero-altered poisson model)
2. when calculating the series logl21 and logl22, do I have to adjust (cfo_t_1_w=0)*log(... to (cfo_t_1_w<=0)*log( ...
3. How do I adjust the command above if I have a different number of independent variables in the two models compared? (e.g. Schwarz information criterion adjustment)

THANK YOU VERY MUCH FOR ANY HELP!!!!!!

abbas
Posts: 6
Joined: Mon Jan 31, 2011 12:59 am

Re: Vuong test using Eviews

Postby abbas » Wed May 11, 2011 10:02 pm

Dear
Use this program in EViews. Instead of mv, bv and eps, you should insert your series.

' Vuong Z-test prog. by Aflatooni
create u 1000
series mv=rnd
series bv=nrnd
series eps=nrnd
equation eq1.ls mv c bv
series rss1 =@ssr
genr res1=resid^2
equation eq2.ls mv c eps
series rss2 =@ssr
genr res2=resid^2
series m11=res1*res2
equation eq3.ls m11 1
scalar n=@regobs
series m12=0.5*log(rss2/rss1)+(n/2)*((res2/rss2)-(res1/rss1))
scalar v12 = @sum(m12)/@sqrt(@sumsq(m12-@mean(m12)))
table(3,4) result
setcolwidth(result,1,10)
setcell(result,1,1,"Vuong non-nested LR test")
setline(result,2)
setcell(result,3,1,"v12 ")
setcell(result,3,2,v12 )
setcell(result,3,3,"p-value = ")
setcell(result,3,4,@tdist(v12 ,n-1))
setline(result,4)
show result
####################
Abbas Aflatooni
Shahid Chamran University of Ahwaz, Khuzestan, Iran
abbasaflatooni@gmail.com


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 41 guests