Re: [Gretl-users] Phillips-Perron Test
by Allin Cottrell
On Tue, 18 Jan 2011, Berend Hasselman wrote:
> I appear to have the same problem on Mac OS X 10.6.6
> A private build of Gretl 1.9.3
>
> Command to launch GNU R is: /Applications/R.app/Contents/MacOS/R
> Start GNU R works (R.app is launched).
> Running the script gives an error:
>
> External command failed
Is there anything useful on stderr?
Allin Cottrell
13 years, 11 months
Re: [Gretl-users] Phillips-Perron Test
by Allin Cottrell
On Tue, 18 Jan 2011, Henrique Andrade wrote:
> Em 18 de janeiro de 2011 Riccardo (Jack) Lucchetti
> <r.lucchetti(a)univpm.it>escreveu:
>
> On Tue, 18 Jan 2011, Henrique Andrade wrote:
> >
> > I'm trying to use R inside a Gretl script in order to perform the
> >> Phillips-Perron test. [ but getting an error ]
> >>
> >> Does anyone has a clue for what's going wrong?
> >
> > You need to use the "--send-data" option, as in
> >
> > foreign language=R --send-data
> >
>
> Dear Riccardo, thanks for your answer, but the "--send-data"
> option didn't fix my problem :( The only way to circumvent this
> is to choose the "Interactive R session" and enter the R
> commands manually.
Is this on a Mac, or what? Your script (plus --send-data) works
fine on Linux and Windows here.
Allin Cottrell
13 years, 11 months
Phillips-Perron Test
by Henrique Andrade
Dear Gretl Community,
I'm trying to use R inside a Gretl script in order to perform the
Phillips-Perron test. Please take a look at my script:
*open australia.gdt
foreign language=R
testedvar <- gretldata[,"lpau"]
PP.test(testedvar)
end foreign*
With this script I've got the following error:
*Error executing script: halting
> end foreign*
Does anyone has a clue for what's going wrong?
Best regards,
--
*Henrique C. de Andrade*
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
13 years, 11 months
Re: [Gretl-users] Segmentation fault when a loop is nested in another loop in progressive mode: a bug?
by Allin Cottrell
On Sun, 16 Jan 2011, Giuseppe Vittucci wrote:
> I replicated the problem simply adding a (now useless) loop in
> the new code:
>
> loop 5000 --progressive
> dataset resample n
>
> #logit regression
> logit A const bid X --quiet
>
> #mean and median Willingness-To-Pay
> matrix x = {X}
> scalar mean_wtp = - ($coeff(const)+(meanc(x)*$coeff[3:
> $ncoeff]))/$coeff(bid)
> scalar median_wtp = - ($coeff(const)+(quantile(x,0.5)*$coeff[3:
> $ncoeff]))/$coeff(bid)
>
> #USELESS NESTED LOOP....
> o = rows(x)
> loop for i = 1...o --quiet
> series s = 0
> endloop
>
> #printing stats on these
> print mean_wtp median_wtp
> #save the coefficients to file
> store wtp.gdt mean_wtp median_wtp
> smpl full
> endloop
Thanks. I can confirm the segfault, and now that I have an example
of the problem this should be fixed fairly quickly.
Allin Cottrell
13 years, 11 months
GARCH, Forecasting
by Alejandro Mosiño
Hello everyone,
Maybe i was not too much specific last time:
I have a variable "y" that follows a GARCH(1,1) process. Then, i Gretl i
type:
garch 1 1 ; y const
Then i got the result and forecasting the out-of-sample values of y can
be done in the usual way. However, i'm interested in forecasting the
out-of-sample variance. I don't know if such a function exists in Gretl.
Thanks in advance,
Alejandro
Hello,
How can we get the out-of-sample volatility / variance forecasts of a
GARCH model?
Thank you,
Alejandro
13 years, 11 months
Re: [Gretl-users] Segmentation fault when a loop is nested in another loop in progressive mode: a bug?
by Allin Cottrell
On Sun, 16 Jan 2011, Giuseppe Vittucci wrote:
> I use Gretl 1.9.3 running on Ubuntu 10.04.
> To calculate some bootstrapped confidence intervals with pairs bootstrap
> I used the loop in progressive mode and the "dataset resample" command.
>
> All works fine if I do not use (simple) loops nested in the first one.
> When instead I do that, Gretl unexpectedly quits with a "Segmentation
> fault" error.
It's possible that the problem you've found is fixed in CVS. If
you could send me a copy of the script you're using I'll run some
tests. Thanks.
Allin Cottrell
13 years, 11 months
Segmentation fault when a loop is nested in another loop in progressive mode: a bug?
by Giuseppe Vittucci
Dear all
I use Gretl 1.9.3 running on Ubuntu 10.04.
To calculate some bootstrapped confidence intervals with pairs bootstrap
I used the loop in progressive mode and the "dataset resample" command.
All works fine if I do not use (simple) loops nested in the first one.
When instead I do that, Gretl unexpectedly quits with a "Segmentation
fault" error.
A bug?
See you
Giuseppe
13 years, 11 months
Re: [Gretl-users] the gretl RNG
by Allin Cottrell
On Sat, 15 Jan 2011, Dr RJF Hudson wrote:
> Mmm ..random number generation is a massive subject
> never too far from a practitioners mind, is it.
> Its always attached to a question mark with me.
> Full marks are surely due to the wizards behind the reseach.
> In one sentence or two, do you know, please what tests are
> used to demonstrate randomness
> of the output observations ?
> Just asking, is all.
The currently canonical test suite seems to be TestU01, devised by
P. L'Ecuyer and R. Simard. See
http://www.iro.umontreal.ca/~simardr/testu01/tu01.html
The elements of the test are derived from various sources,
including several from Donald Knuth of TeX fame.
Allin Cottrell
13 years, 11 months
Re: [Gretl-users] Residual correlation matrix
by Allin Cottrell
On Sat, 15 Jan 2011, Hélio Guilherme wrote:
> If there is an elegance voting, my vote goes for Allin's proposal ;).
The virtue of Jack's version -- though it's a couple of lines
longer -- is that it points up the fact that most of the
calculation is already done in $sigma, the covariance matrix,
which just has to be converted to correlation form.
> On Fri, Jan 14, 2011 at 4:53 PM, Henrique Andrade <henrique.coelho(a)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(a)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(a)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(a)univpm.it
> >> http://www.econ.univpm.it/lucchetti
> >> _______________________________________________
> >> Gretl-users mailing list
> >> Gretl-users(a)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(a)lists.wfu.edu
> > http://lists.wfu.edu/mailman/listinfo/gretl-users
> >
>
--
Allin Cottrell
Department of Economics
Wake Forest University
13 years, 11 months
Re: [Gretl-users] Residual correlation matrix
by Allin Cottrell
On Fri, 14 Jan 2011, Henrique Andrade wrote:
> Em 14 de janeiro de 2011 Olle Olsson <olssonolle(a)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
Allin Cottrell
13 years, 11 months