Hi Sven,
yes of course that would be the standard "solution", but makes things,
maybe unnecessarily, more complicated.
But I would like to know just out of curiosity whether there is a more
direct way.

Cheers,
Artur



2013/4/19 Sven Schreiber <svetosch(a)gmx.net>

> Am 19.04.2013 13:03, schrieb artur tarassow:
> > Hi all,
> >
> > I estimated a VAR model using the standard var-command and want to run a
> > function called varmodtest afterwards. The function simply exploits the
> > "modtest" command and merges different specification test results into a
> > matrix which is passed back.
> >
> > <hansl>
> > function matrix varmodtest (scalar order "Lag length")
> >     #Serial correlation
> >     modtest order --autocorr --quiet
> >     matrix OUTSC = $pvalue' | $test'
> >
> >     return OUTSC
> > end function
> >
> > var 2 LRM IBO
> > matrix A = varmodtest(4)
> > <\hansl>
> >
> > But I obtain the error:
> > "Can't do this: no model has been estimated yet
> > Data error
> > *** error in function varmodtest"
> >
> > How can the function grab information from the previous VAR estimation?
>
> Not the solution, but perhaps a viable workaround: include the
> estimation of the model itself in the function.
>
> -sven
>
>
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
Hi Sven,
yes of course that would be the standard "solution", but makes things, maybe unnecessarily, more complicated.
But I would like to know just out of curiosity whether there is a more direct way.

Cheers,
Artur



2013/4/19 Sven Schreiber <sveto...@gmx.net>
Am 19.04.2013 13:03, schrieb artur tarassow:
> Hi all,
>
> I estimated a VAR model using the standard var-command and want to run a
> function called varmodtest afterwards. The function simply exploits the
> "modtest" command and merges different specification test results into a
> matrix which is passed back.
>
> <hansl>
> function matrix varmodtest (scalar order "Lag length")
>     #Serial correlation
>     modtest order --autocorr --quiet
>     matrix OUTSC = $pvalue' | $test'
>
>     return OUTSC
> end function
>
> var 2 LRM IBO
> matrix A = varmodtest(4)
> <\hansl>
>
> But I obtain the error:
> "Can't do this: no model has been estimated yet
> Data error
> *** error in function varmodtest"
>
> How can the function grab information from the previous VAR estimation?

Not the solution, but perhaps a viable workaround: include the
estimation of the model itself in the function.

-sven



_______________________________________________
Gretl-users mailing list
gretl-us...@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users

Reply via email to