'2011-08-19 11:15
'EViews 7.1	censored, cmp to Censored01.PRG and Censored01b.PRG



%ex7 = "\Example Files\EV7 Manual Data\"
%ch26 = "Chapter 26 - Discrete and Limited Dependent Variable Models"
%wf = @evpath + %ex7 +%ch26 +"\censor.wf1"
wfopen %wf


equation eq20.censored(t,d=x) hrs c age edu kid1

eq20.fit yf
eq20.fit(i) qi
eq20.forecast y2


eq20.makemodel(mod1)
mod1.solve(g=n,z=n)

'compute index
eq20.makeregs xx
series z = eq20.c(1)
for !i = 2 to xx.@count
	z = z+eq20.c(!i)*xx(!i)
next

c = 100
c(1) = @sum(@abs(qi-z))
c(2) = @sum(@abs(qi-i_hrs_0))
c(3) = @sum(@abs(yf-hrs_0))
c(4) = @sum(@abs(y2-yf))
