If there is an elegance voting, my vote goes for Allin's proposal ;).
Em 14 de janeiro de 2011 Olle escreveu:Is there a command available to retrieve the residual correlation matrix returned after performing a normality test (following a VAR estimation)?
My solution:Allin's solution:
open australia.gdt
var 4 lpus le lpau
loop i=1..3
series uhat$i = $uhat[,$i])
endloop
YourMatrix <- corr uhat1 uhat2 uhat3Riccardo's solution:
open australia.gdt
var 4 lpus le lpau
matrix MC = mcorr($uhat)
print MC
Conclusion: It's impossible to be more elegant than you, Allin and Riccardo!
open australia.gdt
var 4 lpus le lpau -q
S = $sigma
s = sqrt(diag(S))
S = S ./ (s.*s')
print S
Best,
Henrique
2011/1/14 Riccardo (Jack) Lucchetti <r.lucchetti@univpm.it>
On Fri, 14 Jan 2011, Allin Cottrell wrote:var 4 lpus le lpau -q
On Fri, 14 Jan 2011, Henrique Andrade wrote:
Em 14 de janeiro de 2011 Olle Olsson <olssonolle@gmail.com> escreveu:
Is there a command available to retrieve the residual correlation matrix
returned after performing a normality test (following a VAR estimation)?
Dear Olle, I don't know if there is a command for this, but you can use a
small script:
open australia.gdt
var 4 lpus le lpau
loop i=1..3
series uhat$i = $uhat[,$i])
endloop
YourMatrix <- corr uhat1 uhat2 uhat3
Or:
open australia.gdt
var 4 lpus le lpau
matrix MC = mcorr($uhat)
print MC
Or:
open australia.gdt
S = $sigma
s = sqrt(diag(S))
S = S ./ (s.*s')
print S
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti@univpm.it
http://www.econ.univpm.it/lucchetti_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
--
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users