Dear Gretl Community,


I'm trying to perform several ADF tests and save the results (statistic + p-value) inside a matrix. Please take a look at my script:

<script>
open australia.gdt
list Variables = lpus iau2 lpau
scalar T = nelem(Variables)

scalar lag = int(12*($nobs/100)^(1/4))

matrix ADF = zeros(nelem(Variables),2)
colnames(ADF, "estatistica p-valor")
rownames(ADF, "lpus iau2 lpau")

loop foreach i Variables
    loop j=1..T
        adf lag $i --c --test-down
        matrix ADF[$j,] = $test ~ $pvalue
    endloop
endloop

print ADF

</script>

With that script I get almost all I need. Only the following problems remain:

(1) The command "rownames" doesn't work;
(2) I canīt figure out how to save the test statistic and the associated p-value (I know I'm overwriting the values inside the loop, but canīt find a way to avoid that).

Best regards,
--
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge