Hi all,

I am trying to store a model table through the modeltab command. I am calling the command _within_ a function. However, even though the model objects seem to get stored, the table will not be written to a file (either tex or rtf).

Is modeltab --output="@filename" not supposed to work within a function for some reason or is this a bug?

It follows an example using a very recent version. The first function adds models through a loop to the table, while the second one adds the model objects manually.

<hansl>
set verbose off
clear
open denmark --quiet

function void floop (const series Y,
                     const lists Xlists)

    string filename = sprintf("est_loop.rtf")  # fails also for tex

    loop foreach i Xlists
        mod$i <- ols Y const Xlists[$i] --robust --quiet
        modeltab add
    endloop

    modeltab --output="@filename"
    modeltab show   # does not appear
end function

function void simple (const series Y,
                     const lists Xlists)

    string filename = sprintf("est_simple.rtf")  # fails also for tex

    mod1 <- ols Y const Xlists[1] --robust --quiet
    mod2 <- ols Y const Xlists[2] --robust --quiet

    modeltab --output="@filename"
    modeltab show   # does not appear
end function



list X1 = LRY IBO
list X2 = LRY IBO IDE
lists X = defarray(X1, X2)

floop(LRM, X)
simple(LRM, X)
</hansl>


Thanks in advance.

Artur
_______________________________________________
Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it
To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/

Reply via email to