[Gretl-users] Gretl-users Digest, Vol 78, Issue 8

cociuba mihai cociuba at gmail.com
Tue Jul 9 14:23:52 EDT 2013


Dear Allin,
thank you for your help.

Mihai


On Tue, Jul 9, 2013 at 4:00 PM, <gretl-users-request at lists.wfu.edu> wrote:

> Send Gretl-users mailing list submissions to
>         gretl-users at lists.wfu.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.wfu.edu/mailman/listinfo/gretl-users
> or, via email, send a message with subject or body 'help' to
>         gretl-users-request at lists.wfu.edu
>
> You can reach the person managing the list at
>         gretl-users-owner at lists.wfu.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Gretl-users digest..."
>
>
> Today's Topics:
>
>    1. retrieving F-stat and p-value from a VAR system (cociuba mihai)
>    2. Re: Constant in log-likelihood and graph of two densities
>       together (Allin Cottrell)
>    3. Re: retrieving F-stat and p-value from a VAR system
>       (Allin Cottrell)
>    4. Re: retrieving F-stat and p-value from a VAR system
>       (Allin Cottrell)
>    5. Implement new criterion for var lag selection
>       (Gian Lorenzo Spisso)
>    6. Re: Implement new criterion for var lag selection
>       (Riccardo (Jack) Lucchetti)
>    7. Re: Implement new criterion for var lag selection
>       (Gian Lorenzo Spisso)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 9 Jul 2013 01:44:11 +0300
> From: cociuba mihai <cociuba at gmail.com>
> Subject: [Gretl-users] retrieving F-stat and p-value from a VAR system
> To: gretl-users at lists.wfu.edu
> Message-ID:
>         <CADSiGnWsNfdNat0ZNGzib+Qg6TsANuRGS3NTPO0id=
> qY36zcXQ at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear GRETL users,
> I'm testing Granger causality between inflation and inflation uncertainty
> for 15 countries and I would like to retrieve the result of the Wald test
> in a matrix, the script that I try to run gets stuck at the last step. Any
> suggestion are welcome.
>
> ###hansl###
> open Table_17.3.gdt
> var 10 M1 R --lagselect
> a=2
> b=3
> c=6
> d=8
> #number of rows 4, but the number of F statistics reported in the VAR
> output for #every equations is 3 so maybe I need more?
> scalar T = 4
> #generate the matrix with 4 rows and 2 colums
> matrix F_stat = zeros(T,2)
> #rename the colums
> # is it possible to have also the name of the F test?
> colnames(F_stat, "t-stat p-value")
>     loop foreach i a b c d
> var $i M1 R --nc
> F_stat[$i,] = $test ~ $pvalue
> endloop
> print F_stat
> ###end###
>
> Thanks, Mihai
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.wfu.edu/pipermail/gretl-users/attachments/20130709/c6c136c9/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Mon, 8 Jul 2013 21:31:05 -0400 (EDT)
> From: Allin Cottrell <cottrell at wfu.edu>
> Subject: Re: [Gretl-users] Constant in log-likelihood and graph of two
>         densities together
> To: Gretl list <gretl-users at lists.wfu.edu>
> Message-ID: <alpine.LFD.2.10.1307082117570.23324 at myrtle>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Mon, 8 Jul 2013, Alecos Papadopoulos wrote:
>
> > Good evening everybody. I am rather new to Gretl and my questions
> > are probably kindergarten-level, but I could not figure out the
> > answers myself or using Help. So here they are
> >
> > 1) I run maximum likelihood from the script window. I am trying
> > two different and non-nested stochastic specifications. I have to
> > compare and evaluate them by using the value of the maximized
> > log-likelihood. But since they are non-nested, their
> > log-likelihood functions are totally different. So, suddenly, the
> > constants of each log-likelihood, although they play no role in
> > the estimation of the parameters, influence the value of the
> > maximized logl - and they are different constants.
> >
> > If I don't include them in the logl function, then the values of
> > the maximized logl (and the AIC and BIC and HQ criteria) will be
> > misleading for comparison purposes of the two competing stochastic
> > specifications, and currently I am doing the corrections by hand
> > (which I can live with). But it would be nice not to have output
> > that needs such corrections. I tried to include them in the
> > specification of the logl after the "mle logl = " command. But
> > when I tried to include them as, say, "ln(4/sqrt(2/pi))" or
> > "ln(4/sqrt(2/%pi)) I get "syntax error on the command line".
>
> The recommended way of accessing pi = 3.14... in current gretl
> (version 1.9.12) is "$pi", though plain "pi" (deprecated since May
> 2012) will still work; "%pi" will definitely not work. The
> expression
>
> ln(4/sqrt(2/$pi))
>
> is correctly evaluated as 1.612... in current gretl.
>
> > When I calculate them explicitly, say 0.45678 and enter this
> > constant instead, Gretl runs, but the estimation goes astray, and
> > produces different results than when the constant is not included.
> > I suspect that this may have something to do with the fact that I
> > do not specify analytical derivatives, but I really don't know.
> > What am I doing wrong?
>
> The issue of analytical versus numerical derivatives wouldn't seem
> to be relevant to the inclusion or non-inclusion of a constant term
> (which obviously doesn't have a derivative) in the log-likelihood.
> I suppose something else must be wrong here. I think you'll have to
> show us your full script to get useful help.
>
> > 2) Again for comparison purposes, I would want to have in one graph the
> > estimated densities of two series. But when I select two series the
> > "Variable" menu becomes disabled, while in the "View" menu there are
> > various graph options, but not the option to graph the estimated
> > densities of the two series together. Is there a way around this?
>
> This question has come up before. Please see
> http://lists.wfu.edu/pipermail/gretl-users/2013-April/008745.html
>
> Allin Cottrell
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 8 Jul 2013 21:59:16 -0400 (EDT)
> From: Allin Cottrell <cottrell at wfu.edu>
> Subject: Re: [Gretl-users] retrieving F-stat and p-value from a VAR
>         system
> To: Gretl list <gretl-users at lists.wfu.edu>
> Message-ID: <alpine.LFD.2.10.1307082142420.23324 at myrtle>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Tue, 9 Jul 2013, cociuba mihai wrote:
>
> > I'm testing Granger causality between inflation and inflation
> > uncertainty for 15 countries and I would like to retrieve the
> > result of the Wald test...
>
> What Wald test? (That is, for what null hypothesis?)
>
> > in a matrix, the script that I try to run gets stuck at the last
> > step. Any suggestion are welcome.
>
> [last step]
> > loop foreach i a b c d
> >   var $i M1 R --nc
> >   F_stat[$i,] = $test ~ $pvalue
> > endloop
>
> The "var" command in gretl does not supply a $test accessor. In fact
> no model estimation command in gretl does that: the label "test" is
> much too general, given that many sorts of tests might be
> contemplated after estimating a given model (either single-equation
> or multi-equation).
>
> Since a VAR is just a collection of equations related in a certain
> way (identical right-hand sides, specific relation between left-hand
> side variables and right-hand sides), estimated in practice via OLS,
> you can get whatever Wald statistics you want by estimating the
> equations singly via the "ols" command, and using either "omit" or
> "restrict" (which do produce $test and $pvalue).
>
> (I suppose we could generalize the current scalar $Fstat accessor
> for single equation models to a matrix for VARs, but that would
> require some decisions on which F-stats to include and in what
> configuration.)
>
> Allin Cottrell
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 8 Jul 2013 22:15:21 -0400 (EDT)
> From: Allin Cottrell <cottrell at wfu.edu>
> Subject: Re: [Gretl-users] retrieving F-stat and p-value from a VAR
>         system
> To: Gretl list <gretl-users at lists.wfu.edu>
> Message-ID: <alpine.LFD.2.10.1307082212280.23324 at myrtle>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Mon, 8 Jul 2013, Allin Cottrell wrote:
>
> > On Tue, 9 Jul 2013, cociuba mihai wrote:
> >
> >> I'm testing Granger causality between inflation and inflation
> uncertainty
> >> for 15 countries and I would like to retrieve the result of the Wald
> >> test...
> >
> > What Wald test? (That is, for what null hypothesis?)
>
> OK, in fact clear enough from context. Trivial example of what I
> described in my previous posting:
>
> <hansl>
> open data9-7
> scalar p = 4
> var p PRIME UNEMP
> list RHS = const PRIME(-1 to -p) UNEMP(-1 to -p)
> # first equation: does UNEMP Granger-cause PRIME?
> ols PRIME RHS --quiet
> omit UNEMP(-1 to -p) --quiet --test-only
> eval $test
> eval $pvalue
> # second equation: does PRIME Granger-cause UNEMP?
> ols UNEMP RHS --quiet
> omit PRIME(-1 to -p) --quiet --test-only
> eval $test
> eval $pvalue
> </hansl>
>
> Allin Cottrell
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 9 Jul 2013 13:15:43 +0200
> From: Gian Lorenzo Spisso <glspisso at gmail.com>
> Subject: [Gretl-users] Implement new criterion for var lag selection
> To: gretl-users at lists.wfu.edu
> Message-ID:
>         <CAJ_wB9=
> gLShM2DdET7uk_f0CDBTBRgdcsqj_G_mvhkHE4jcE_w at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
> I would like to implement in GRETL the procedure for lag selection of a VAR
> as specified here:
> http://www.tandfonline.com/doi/pdf/10.1080/1350485022000041050 which
> essentialy replace BIC and HQC with a weighted average of the two.
>
> Is there any easy to install package that I could use?
> Otherwise could it be possible to simply reprogram AIC column to show this
> criterion instead? In case can anybody provide a little guidance for the
> process? I am not familiar with gretl programming.
>
> Thank you,
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.wfu.edu/pipermail/gretl-users/attachments/20130709/f27dfb6a/attachment-0001.html
>
> ------------------------------
>
> Message: 6
> Date: Tue, 9 Jul 2013 14:45:28 +0200 (CEST)
> From: "Riccardo (Jack) Lucchetti" <r.lucchetti at univpm.it>
> Subject: Re: [Gretl-users] Implement new criterion for var lag
>         selection
> To: Gretl list <gretl-users at lists.wfu.edu>
> Message-ID: <alpine.DEB.2.10.1307091444170.13798 at ec-4.econ.univpm.it>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Tue, 9 Jul 2013, Gian Lorenzo Spisso wrote:
>
> > Hi all,
> > I would like to implement in GRETL the procedure for lag selection of a
> VAR
> > as specified here:
> > http://www.tandfonline.com/doi/pdf/10.1080/1350485022000041050 which
> > essentialy replace BIC and HQC with a weighted average of the two.
> >
> > Is there any easy to install package that I could use?
> > Otherwise could it be possible to simply reprogram AIC column to show
> this
> > criterion instead? In case can anybody provide a little guidance for the
> > process? I am not familiar with gretl programming.
>
> I don't have a subscription to "Applied Economics Journal". Could you
> describe me the proposed method?
>
> -------------------------------------------------------
>    Riccardo (Jack) Lucchetti
>    Dipartimento di Scienze Economiche e Sociali (DiSES)
>
>    Universit? Politecnica delle Marche
>    (formerly known as Universit? di Ancona)
>
>    r.lucchetti at univpm.it
>    http://www2.econ.univpm.it/servizi/hpp/lucchetti
> -------------------------------------------------------
>
> ------------------------------
>
> Message: 7
> Date: Tue, 9 Jul 2013 14:58:42 +0200
> From: Gian Lorenzo Spisso <glspisso at gmail.com>
> Subject: Re: [Gretl-users] Implement new criterion for var lag
>         selection
> To: r.lucchetti at univpm.it, Gretl list <gretl-users at lists.wfu.edu>
> Message-ID:
>         <CAJ_wB9ndVjdNygwUYYDQEc9Ad7=+
> Px9q4wDW+orXLza6f28rjw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear Riccardo,
> I attach a screenshot of the relevant part.
> You can see the formulas for the two criterion, and the new criterion
> proposed by Hatemi which simply averages the two. He then goes on and uses
> a Montecarlo simulation to show that this mixed criterion as higher
> probability in picking the right lag.
>
>
> On Tue, Jul 9, 2013 at 2:45 PM, Riccardo (Jack) Lucchetti <
> r.lucchetti at univpm.it> wrote:
>
> > On Tue, 9 Jul 2013, Gian Lorenzo Spisso wrote:
> >
> >  Hi all,
> >> I would like to implement in GRETL the procedure for lag selection of a
> >> VAR
> >> as specified here:
> >> http://www.tandfonline.com/**doi/pdf/10.1080/**1350485022000041050<
> http://www.tandfonline.com/doi/pdf/10.1080/1350485022000041050>which
> >> essentialy replace BIC and HQC with a weighted average of the two.
> >>
> >> Is there any easy to install package that I could use?
> >> Otherwise could it be possible to simply reprogram AIC column to show
> this
> >> criterion instead? In case can anybody provide a little guidance for the
> >> process? I am not familiar with gretl programming.
> >>
> >
> > I don't have a subscription to "Applied Economics Journal". Could you
> > describe me the proposed method?
> >
> > ------------------------------**-------------------------
> >   Riccardo (Jack) Lucchetti
> >   Dipartimento di Scienze Economiche e Sociali (DiSES)
> >
> >   Universit? Politecnica delle Marche
> >   (formerly known as Universit? di Ancona)
> >
> >   r.lucchetti at univpm.it
> >   http://www2.econ.univpm.it/**servizi/hpp/lucchetti<
> http://www2.econ.univpm.it/servizi/hpp/lucchetti>
> > ------------------------------**-------------------------
> > _______________________________________________
> > Gretl-users mailing list
> > Gretl-users at lists.wfu.edu
> > http://lists.wfu.edu/mailman/listinfo/gretl-users
> >
>
>
>
> --
> Gian Lorenzo Spisso
>
>
> *Phone*: 415-359-4330
> *Skype*: glspisso
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.wfu.edu/pipermail/gretl-users/attachments/20130709/be5d2ca1/attachment.html
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: HatemiCriterion.jpg
> Type: image/jpeg
> Size: 96716 bytes
> Desc: not available
> Url :
> http://lists.wfu.edu/pipermail/gretl-users/attachments/20130709/be5d2ca1/attachment.jpg
>
> ------------------------------
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users at lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
> End of Gretl-users Digest, Vol 78, Issue 8
> ******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wfu.edu/pipermail/gretl-users/attachments/20130709/e3d9b7ef/attachment-0001.html 


More information about the Gretl-users mailing list