[Gretl-users] Residual correlation matrix

Hélio Guilherme helioxentric at gmail.com
Sat Jan 15 11:28:24 EST 2011


If there is an elegance voting, my vote goes for Allin's proposal ;).



On Fri, Jan 14, 2011 at 4:53 PM, Henrique Andrade <henrique.coelho at gmail.com
> wrote:

> 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:*
>
> open australia.gdt
> var 4 lpus le lpau
> loop i=1..3
>     series uhat$i = $uhat[,$i])
> endloop
> YourMatrix <- corr uhat1 uhat2 uhat3
>
> *Allin's solution:*
>
> open australia.gdt
> var 4 lpus le lpau
> matrix MC = mcorr($uhat)
> print MC
>
> *Riccardo's solution:*
>
> open australia.gdt
> var 4 lpus le lpau -q
> S = $sigma
> s = sqrt(diag(S))
> S = S ./ (s.*s')
> print S
>
> Conclusion: It's impossible to be more elegant than you, Allin and
> Riccardo!
>
> Best,
> Henrique
>
> 2011/1/14 Riccardo (Jack) Lucchetti <r.lucchetti at univpm.it>
>
>> On Fri, 14 Jan 2011, Allin Cottrell wrote:
>>
>>  On Fri, 14 Jan 2011, Henrique Andrade wrote:
>>>
>>>  Em 14 de janeiro de 2011 Olle Olsson <olssonolle at 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
>> var 4 lpus le lpau -q
>> S = $sigma
>> s = sqrt(diag(S))
>> S = S ./ (s.*s')
>> print S
>>
>>
>> Riccardo (Jack) Lucchetti
>> Dipartimento di Economia
>> Università Politecnica delle Marche
>>
>> r.lucchetti at univpm.it
>> http://www.econ.univpm.it/lucchetti
>> _______________________________________________
>> Gretl-users mailing list
>> Gretl-users at 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 at lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wfu.edu/pipermail/gretl-users/attachments/20110115/8c0328ef/attachment.html 


More information about the Gretl-users mailing list