Page 1 of 1

How to include trend in residual variance

Posted: Sun Nov 07, 2010 6:57 pm
by gatabuta
Dear fellows,

I wonder how to include trend in residual variance.
For instance,
y = alpha + beta*x + e
E(e^2) = v_0 + v*@trend

Best wishes.

Re: How to include trend in residual variance

Posted: Mon Nov 08, 2010 1:02 am
by trubador
You need to do maximum likelihood estimation. EViews has a LogL ojbect (Object/New Object/LogL) to handle this kind of estimation problems. Your model can be specified as follows:

Code: Select all

@logl mle rsdl = y - c(1) - c(2)*x var = c(3)+c(4)*@trend mle = log(@dnorm(rsdl/@sqrt(var))) - log(var)/2 param c(1) .0 c(2) .0 c(3) .1 c(4) .0
Please keep in mind that you might experience some convergence problems due to the variance specification. In that case, you can assign different starting values for the coefficients to be estimated (i.e. the last line that starts with the param command) or change the specification itself.