Hi there,

I want to calculate
$V[\widehat{u_{ijt}}]$  for Fixed Effect models.
In a first step I reproduce the forecast error variance of a pooled OLS model.
Using the following formula


$V[\widehat{u_{ijt}}] = V[{\epsilon}]
      +{{x_{ijt}}^{'}*V[\hat{\beta}]*{x_{ijt}}$

which provided the same values as GRETL produces with $fcerr.
Can I apply the same calculation after the Fixed Effect?
I'm using the latest snapshot and forecast error for Fixed Effect models are not available.
Hence, I doubt whether the above formula applies for FE models too.
How are they then to be computed?

Here is the script:
open greene14_1.gdt

smpl full

"FE " <- panel log(C) 0 log(PF) --fixed-effects --robust --quiet
series FE_r = $uhat
series FE_h = $yhat
#series FE_fcse = $fcerr
matrix FE_v = $vcv
scalar FE_e = $sigma
series FE_a = $ahat
list FE_xlist = $xlist
matrix FE_x ={ FE_xlist }
#just for the first id
matrix FE_x_1 =FE_x[1,]
matrix FE_fv_1 = FE_e^2 +FE_x_1*FE_v*FE_x_1'
matrix FE_fse_1=sqrt(FE_fv_1)

"PCS " <- ols log(C) 0 log(PF) --robust --quiet
series PCS_r = $uhat
series PCS_h = $yhat
series PCS_fcse = $fcerr  -> this was working was the last snapshot I used, now it is again not available. Could you change that again?
matrix PCS_v = $vcv
scalar PCS_e = $sigma
list PCS_xlist = $xlist
matrix PCS_x ={ PCS_xlist }
#just for the first id
matrix PCS_x_1 =PCS_x[1,]
matrix PCS_fv_1 = PCS_e^2 +PCS_x_1*PCS_v*PCS_x_1'
matrix PCS_fse_1=sqrt(PCS_fv_1)

Thanks in advance
Leon




Am 22.03.2010 03:32, schrieb Allin Cottrell:
On Thu, 21 Aug 2008, [iso-8859-1] Ricardo Gonçalves Silva wrote:

Thanks so much. I will try the script now.
Only a newbie question: the fcasts generated are out-of-sample, right?
Yes, the William Greene dataset I used has data for 6 firms from
1970 to 1984. My script estimates the fixed-effects model over the
range 1970 to 1979, then generates forecasts for 1970-1984.

I produced "forecasts" for all years just to show that the
in-sample values agree with $yhat, but presumably it's the out of
sample values that are of most interest.

Allin Cottrell



_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users