I was wondering if you could assist me on the following matter:
I am trying to code a panel GARCH-in-mean as in the paper of Lee, Jim, 2010. "The link between output growth and volatility: Evidence from a GARCH model with panel data," Economics Letters, vol. 106(2), pages 143-145, which can be found here:http://www.mkaranasos.com/LeeEL10.pdf. The model is based on Cermeño, R., Grier, K.B., 2006. "Conditional heteroskedasticity and cross-sectional dependence in panel data: an empirical study of inflation uncertainty in the G7 countries". In: Baltagi, B.H. (Ed.), Panel Data Econometrics, vol. 10. Elsevier, New York, pp. 259–278. Chapter.
My goal is to obtain an estimation output as in Column C of Table 2 in Lee's (2010) paper. That is, to have i) an AR(p) parameter in the conditional mean, ii) put the standard deviation (or cond. variance) in the conditional mean (and iii) if possible to put the mean in the conditional variance equation).
I have found these two posts which might be related to what I am thinking about;
code of Cermeno and Grier (2006):
http://www.estima.com/forum/viewtopic.php?f=11&t=715
and a MV-GARCH-M with square roots:
http://www.estima.com/forum/viewtopic.php?f=11&t=775
I wanted to ask you if this is doable and if so how to proceed with the following code?
Code: Select all
all 6237
open data g10xrate.xls
data(format=xls,org=columns) / usxjpn usxfra usxsui
*
set xjpn = 100.0*log(usxjpn/usxjpn{1})
set xfra = 100.0*log(usxfra/usxfra{1})
set xsui = 100.0*log(usxsui/usxsui{1})
*
* Estimation using MAXIMIZE
* The initial few lines of this set the estimation range, which needs to
* be done explicitly, and the number of variables. Then, vectors for the
* dependent variables, residuals and residuals formulas are set up. The
* SET instructions copy the dependent variables over into the slots in
* the vector of series.
*
compute gstart=2,gend=6237
compute n=3
dec vect[series] y(n) u(n)
dec vect[frml] resid(n)
set y(1) = xjpn
set y(2) = xfra
set y(3) = xsui
*
* This is specific to a mean-only model. It sets up the formulas (the &i
* are needed in the formula definitions when the FRML is defined in a
* loop), and estimates them using NLSYSTEM. This both initializes the
* mean parameters, and computes the unconditional covariance matrix. If
* you want more general mean equations, the simplest way to do that
* would be to define each FRML separately.
*
dec vect b(n)
nonlin(parmset=meanparms) b
do i=1,n
frml resid(i) = (y(&i)-b(&i))
end do i
nlsystem(parmset=meanparms,resids=u) gstart gend resid
compute rr=%sigma
*
* The paths of the covariance matrices and uu' are saved in the
* SERIES[SYMM] names H and UU. UX and HX are used to pull in residuals
* and H matrices.
*
declare series[symm] h uu
*
* ux is used when extracting a u vector
*
declare symm hx(n,n)
declare vect ux(n)
*
* These are used to initialize pre-sample variances.
*
gset h * gend = rr
gset uu * gend = rr
*
* This is a standard (normal) log likelihood formula for any
* multivariate GARCH model. The difference among these will be in the
* definitions of HF and RESID. The function %XT pulls information out of
* a matrix of SERIES.
*
declare frml[symm] hf
*
frml logl = $
hx = hf(t) , $
%do(i,1,n,u(i)=resid(i)) , $
ux = %xt(u,t), $
h(t)=hx, uu(t)=%outerxx(ux), $
%logdensity(hx,ux)
*****************************************************
*
* Panel GARCH - DVECH with restrictions
*
dec symm vcs(n,n)
dec real delta lambda gamma rho
dec symm vbs(n,n) vas(n,n)
*
compute vcs=rr*.1,delta=lambda=.8,gamma=rho=.1
nonlin(parmset=garchparms) vcs delta lambda gamma rho
frml hf = vcs+vbs.*h{1}+vas.*uu{1}
*
* Call once during START option to fill in the VAS and VBS arrays
*
function PGARCHInit
local integer i j
ewise vbs(i,j)=%if(i==j,delta,lambda)
ewise vas(i,j)=%if(i==j,gamma,rho)
end
*
maximize(start=PGARCHInit(),parmset=meanparms+garchparms,pmethod=simplex,piters=10,method=bfgs,iters=400) logl gstart gendBest,
Nik