Re: [Gretl-users] Out-of-sample forecasting

2012-11-09 Thread Marta Szymańska
Thanks you a lot, however I'm still a little bit confused about hfc equation. The equation of hfc for GARCH model: # forecast the variance hfc = a0 + a1 * e(-1)^2 + b1 * hfc(-1) I have got from Allin Cottrell's script from this link: http://lists.wfu.edu/pipermail/gretl-users/2011-January/005772

Re: [Gretl-users] isscalar

2012-11-09 Thread Ignacio Diaz-Emparanza
On 09/11/12 19:17, Allin Cottrell wrote: > ... The user-function can, however, be written more > tersely -- particularly if we take returning NA as sufficient > indication that the question is invalid: > > function scalar iseven (scalar a) > return a != floor(a) ? NA : a % 2 == 0 > end function

Re: [Gretl-users] isscalar

2012-11-09 Thread Jack
On Fri, 9 Nov 2012, Allin Cottrell wrote: > I've sometimes wondered if it would be worth trying to expose some sort of > "enum" system in gretl -- e.g. in this context NONE = 0, SCALAR = 1, SERIES = > 2 and so on. It would obviously be more intuitive to be able to do > > if typeof(whatever) == S

Re: [Gretl-users] isscalar

2012-11-09 Thread Jack
On Fri, 9 Nov 2012, Ignacio Diaz-Emparanza wrote: > Slightly related (but different) to this question: I needed frequently a > way to determine whether an integer is even or odd, and I finally wrote > this function: > > > function scalar iseven(scalar A) > if (A==floor(A)) > scalar A2

Re: [Gretl-users] Out-of-sample forecasting

2012-11-09 Thread Jack
On Fri, 9 Nov 2012, Marta Szymańska wrote: > Hello, > > I'm writing a master thesis about volatility forecasting using GARCH and > GJR models (with Normal, stud-t and GED distributions). I need to > prepare out-of-sample forecasting for that models. Thus, I've tried to > prepare scripts using gig

Re: [Gretl-users] isscalar

2012-11-09 Thread Jack
On Fri, 9 Nov 2012, Allin Cottrell wrote: > On Fri, 9 Nov 2012, Sven Schreiber wrote: > >> Am 09.11.2012 18:17, schrieb Allin Cottrell: >>> On Fri, 9 Nov 2012, Sven Schreiber wrote: I'm not saying I need it, but it isn't obvious to me why it is less useful in principle than for exam

Re: [Gretl-users] isscalar

2012-11-09 Thread Ignacio Diaz-Emparanza
Slightly related (but different) to this question: I needed frequently a way to determine whether an integer is even or odd, and I finally wrote this function: function scalar iseven(scalar A) if (A==floor(A)) scalar A2=floor(A/2) scalar A2b=A/2 scalar even = (A2

[Gretl-users] Out-of-sample forecasting

2012-11-09 Thread Marta Szymańska
Hello, I'm writing a master thesis about volatility forecasting using GARCH and GJR models (with Normal, stud-t and GED distributions). I need to prepare out-of-sample forecasting for that models. Thus, I've tried to prepare scripts using gig package. I've got the following script for GARCH (1,1)

Re: [Gretl-users] isscalar

2012-11-09 Thread Sven Schreiber
Am 09.11.2012 18:17, schrieb Allin Cottrell: > On Fri, 9 Nov 2012, Sven Schreiber wrote: > >> >> I'm not saying I need it, but it isn't obvious to me why it is less >> useful in principle than for example 'isstring()'. Instead it seems to >> be a natural complement to the other 'is...()' function

Re: [Gretl-users] GARCH, Forecasting

2012-11-09 Thread Sven Schreiber
Am 08.11.2012 21:14, schrieb Tomasz Bielawski: > > I have question if it is possible in gretl to prepare similar prediction > with one regressant in variance equation for normal,t and GED > distributions. Tomasz, it may well be that I'm missing something here, but if you can estimate the varian

Re: [Gretl-users] isscalar (was: functions mshape with variable elements and isscalar)

2012-11-09 Thread Sven Schreiber
Am 09.11.2012 15:30, schrieb Allin Cottrell: > On Fri, 9 Nov 2012, Pindar wrote: > >> The function 'isscalar' seems to be broken (and is only named on p. 148 in >> the Command Reference). > > Yes, it seems to be orphaned (and anyway does not seem to be > very useful). Let's get rid of it. > I'm n

Re: [Gretl-users] isscalar

2012-11-09 Thread Allin Cottrell
On Fri, 9 Nov 2012, Ignacio Diaz-Emparanza wrote: > On 09/11/12 19:17, Allin Cottrell wrote: >> ... The user-function can, however, be written more >> tersely -- particularly if we take returning NA as sufficient >> indication that the question is invalid: >> >> function scalar iseven (scalar a) >

[Gretl-users] GARCH, GJR forecasting

2012-11-09 Thread Tomasz Bielawski
Hello, I am working now with time series and I found your script for garch forecasting which was very useful for me: open b-g.gdt garch 1 1 ; Y series e = $uhat series h = $h dataset addobs 10 a0 = $coeff[2] a1 = $coeff[3] b1 = $coeff[4] series hfc = h # set future errors to their expectation e

Re: [Gretl-users] isscalar

2012-11-09 Thread Allin Cottrell
On Fri, 9 Nov 2012, Riccardo (Jack) Lucchetti wrote: > On Fri, 9 Nov 2012, Allin Cottrell wrote: > >> On Fri, 9 Nov 2012, Sven Schreiber wrote: >> >>> Am 09.11.2012 18:17, schrieb Allin Cottrell: On Fri, 9 Nov 2012, Sven Schreiber wrote: > > I'm not saying I need it, but it isn't ob

Re: [Gretl-users] isscalar

2012-11-09 Thread Allin Cottrell
On Fri, 9 Nov 2012, Ignacio Diaz-Emparanza wrote: > Slightly related (but different) to this question: I needed frequently a > way to determine whether an integer is even or odd, and I finally wrote > this function: > > > function scalar iseven(scalar A) > if (A==floor(A)) > scalar A2

Re: [Gretl-users] isscalar

2012-11-09 Thread Allin Cottrell
On Fri, 9 Nov 2012, Allin Cottrell wrote: > On Fri, 9 Nov 2012, Sven Schreiber wrote: > >> Am 09.11.2012 18:17, schrieb Allin Cottrell: >>> On Fri, 9 Nov 2012, Sven Schreiber wrote: I'm not saying I need it, but it isn't obvious to me why it is less useful in principle than for exa

Re: [Gretl-users] isscalar

2012-11-09 Thread Allin Cottrell
On Fri, 9 Nov 2012, Sven Schreiber wrote: > Am 09.11.2012 18:17, schrieb Allin Cottrell: >> On Fri, 9 Nov 2012, Sven Schreiber wrote: >>> >>> I'm not saying I need it, but it isn't obvious to me why it is less >>> useful in principle than for example 'isstring()'. Instead it seems to >>> be a natu

Re: [Gretl-users] SVAR some questions

2012-11-09 Thread Jack
On Sat, 3 Nov 2012, Pindar wrote: > Update 2: > There is a small bug in the SVAR package when writing the free parameters > into the model (in the last step). > Just run the hansl snippet. Not really a bug. The vector containing the unrestricted parameters only is implicitly defined by the rela

Re: [Gretl-users] isscalar (was: functions mshape with variable elements and isscalar)

2012-11-09 Thread Allin Cottrell
On Fri, 9 Nov 2012, Sven Schreiber wrote: > Am 09.11.2012 15:30, schrieb Allin Cottrell: >> On Fri, 9 Nov 2012, Pindar wrote: >>> The function 'isscalar' seems to be broken (and is only named on p. 148 in >>> the Command Reference). >> >> Yes, it seems to be orphaned (and anyway does not seem to b

[Gretl-users] functions mshape with variable elements and isscalar

2012-11-09 Thread Pindar
Hi, I have a question concerning the mshape and isscalar functions: The second and third argument are scalars but when I tried to use different inputs for these arguments stored in a matrix GRETL flags an error. This is not the case with similar functions like 'zeros'. The function 'isscalar' s

Re: [Gretl-users] Problem with comment lines

2012-11-09 Thread Pindar
Am 08.11.2012 23:14, schrieb Allin Cottrell: > On Wed, 7 Nov 2012, Henrique Andrade wrote: > >> Also I would like to make a suggestion: In my humble opinion, the >> syntax to print list elements is not so intuitive and it looks like >> very different from the other uses of the "print" command. My >

Re: [Gretl-users] functions mshape with variable elements and isscalar

2012-11-09 Thread Allin Cottrell
On Fri, 9 Nov 2012, Pindar wrote: > I have a question concerning the mshape and isscalar functions: > The second and third argument [for mshape] are scalars but > when I tried to use different inputs for these arguments > stored in a matrix GRETL flags an error. This is not the > case with sim

[Gretl-users] Quantile Regression with for autocorrelated process

2012-11-09 Thread Daniel Bencik
  Dear guys,   I have a time series of hourly deviations of the electricity market saturation from zero, in other words I have data on whether the total electric system in my country was in black or red quantitites for each hour of the last months. The intention is to predict the likelihood tha