Forecasting and evaluating a proportional hazard model

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

Dani1
Posts: 6
Joined: Wed Jun 22, 2011 1:54 pm

Forecasting and evaluating a proportional hazard model

Postby Dani1 » Thu Mar 08, 2012 4:28 pm

Dear all, (I'm using Eviews 7)

I have programmed a proportional hazard model using the following code:

Code: Select all

' declare params to estimate with initial values coef(3) b = 0 coef(1) a = 1 coef(1) g = 1 ' setup likelihood for Loglogistic Proportional Hazard model logl llllph llllph.append @logl loglllph ' define exponent part llllph.append xb = b(1)+b(2)*blabla+b(3)*blablala ' define log hazard and integrated hazard function ++ llllph.append lhaz=log(a(1))+log(abs(g(1)))+(a(1)-1)*log(abs(g(1))*duration)-log(1+(abs(g(1))*duration)^(a(1))) llllph.append ihaz=log(1+(abs(g(1))*duration)^(a(1))) llllph.append loglllph = y*(xb+lhaz)-exp(xb)*ihaz smpl @all if log(duration)>0 ' do MLE llllph.ml(d,m=1000) show llllph.output ' generate genererlized residuals genr genres_phm_loglog=exp(xb)*log(1+(abs(g(1))*duration)^a(1)) ' generate survival function genr surv=exp(-ihaz)
Now that I've estimated the model and got the parameter estimates via Maximum Likelihood I want to evaluate and forecast the model. There are several ways of doing this. I was thinking about trying to calculate the average duration of a spell. I could compare the foreasted durations with the actual durations.
Another thing I could look at is the probability of the event ending in the next period. I could for instance take a certain period and then calculate the expected number of ended durations with the true number of ended durations.

The question is which of these two methods do you think would be more interesting and how can I program this in Eviews. I have the model estimation. How can I use this to make forecast. I tried via proc-estimate, but it doesnt work like that. In OlS you can point click by using proc-forecast. How does this work in a ML-estimated Proportional Hazard Model?

Thanks in advance

Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests