On Fri, 30 May 2014, Sven Schreiber wrote:
Am 30.05.2014 16:08, schrieb Carla Fernandes:
> Hello,
> Someone could tell me is it is possible to bootstrap the coefficient "b"
> of a system equations SUR?
> Thank you very much.
>
I don't think there exists a built-in feature to do that. Of course it's
possible to script it with the hansl language, and the 'varsimul()'
function would probably be used in such a script, possibly along with
'resample()' (for a non-parametric bootstrap).
This is vary simplified example, which implements the most naive variant
of the bootstrap. Maybe you can build on this.
<hansl>
nulldata 256
set seed 365357
# --- generate a two-equation example sur -----
scalar rho = 0.5
series x1 = normal()
series x2 = normal()
series x3 = normal()
series e1 = normal()
series e2 = rho * e1 + sqrt(1-rho^2) * normal()
series y1 = 2 + x1 + x2 + e1
series y2 = -2 + x1 + x3 + e2
# --- do estimation -----
"MySUR" <- system
equation y1 const x1 x2
equation y2 const x1 x3
end system
estimate "MySUR" method=sur
npar = rows($coeff)
# --- simple pairs bootstrap ----------
list DATA = y1 y2 x1 x2 x3
matrix mDATA = {DATA}
scalar repli = 3999
matrix boot = zeros(repli, npar)
loop r=1..repli --quiet
matrix xtr = ceil(muniform($nobs,1) .* $nobs)
c = 1
loop foreach i DATA --quiet
series $i = mDATA[xtr,c]
c++
endloop
estimate "MySUR" method=sur --quiet
boot[r,] = $coeff'
endloop
V = mcov(boot)
stderr = sqrt(diag(V))
print stderr
summary --matrix=boot
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------