Allin Cottrell | 3 May 2010 18:24
Picon
Favicon

Re: error with heteroscedacity function.


On Wed, 28 Apr 2010, denis joubert wrote:

> Using libgretl 1.8.7, with heteroscedacity function, i got the error :
> "Weight variable is all zeros, aborting regression"
> but when i add one observations it works or some observations added later it
> does the same error, more observations later same it works and
> so on...

The test libgretl was using for "weights all zero" was not really
appropriate: it was that the sum of squares of the weight series
equals machine zero. I've now modified this in CVS and your
example runs. (The weights are extremely small, but not literally
zero.)

However, the example is rather odd and this may explain gretl's
complaints. The auxiliary regression for hsk estimation produces a
perfect fit with the original dataset (T = 226), since you have
151 usable observations and 151 regressors (75 lags, 75 squares of
lags, plus constant). Adding another observation gives one degree
of freedom to the auxiliary regression, which seems to help
matters.

Allin Cottrell

John C Frain | 3 May 2010 20:21
Picon

Arima with exogenous variables.

According to the users guide (see equation 20,8 on page 147 of the May
2010 version) the instruction

arima 0 1 1 ; 0 1 1 ; ln_vols ln_vol_exm_s ln_price ban_e const

should produce the same results as

arima 0 0 1 ; 0 0 1 ; d_sd_ln_vols  d_sd_ln_vol_e  d_sd_ln_price  d_sd_ban_e

I am presuming that the constant is differenced along with the other x
variables.  In effect it produces the same results as

arima 0 0 1 ; 0 0 1 ; d_sd_ln_vols  d_sd_ln_vol_e  d_sd_ln_price
d_sd_ban_e const

The instruction

arima 0 1 1 ; 0 1 1 ; ln_vols ln_vol_exm_s ln_price ban_e

does produce the result that I require.

Can anyone confirm that this is the intended behaviour.

--

-- 
John C Frain
Economics Department
Trinity College Dublin
Dublin 2
Ireland
www.tcd.ie/Economics/staff/frainj/home.html
(Continue reading)

Allin Cottrell | 3 May 2010 20:58
Picon
Favicon

Re: Arima with exogenous variables.


On Mon, 3 May 2010, John C Frain wrote:

> According to the users guide (see equation 20,8 on page 147 of the May
> 2010 version) the instruction
>
> arima 0 1 1 ; 0 1 1 ; ln_vols ln_vol_exm_s ln_price ban_e const
>
> should produce the same results as
>
> arima 0 0 1 ; 0 0 1 ; d_sd_ln_vols  d_sd_ln_vol_e  d_sd_ln_price  d_sd_ban_e
>
> I am presuming that the constant is differenced along with the other x
> variables.

It isn't. That would just give you zero, and hence doesn't seem
like something the user would want. The following should be
equivalent, for X a list of regressors not including the constant:

arima p 1 q ; y X
arma p 0 q ; d_y d_X

In other words, if you want arima without a constant, then don't
specify a constant, rather than specifying one and expecting gretl
to destroy it for you. Perhaps the manual should be clarified on
this point.

Allin Cottrell

(Continue reading)

denis joubert | 4 May 2010 09:27
Picon

Re: error with heteroscedacity function.

2010/5/3 Allin Cottrell <cottrell@...>:
>
> On Wed, 28 Apr 2010, denis joubert wrote:
>
>> Using libgretl 1.8.7, with heteroscedacity function, i got the error :
>> "Weight variable is all zeros, aborting regression"
>> but when i add one observations it works or some observations added later it
>> does the same error, more observations later same it works and
>> so on...
>
> The test libgretl was using for "weights all zero" was not really
> appropriate: it was that the sum of squares of the weight series
> equals machine zero. I've now modified this in CVS and your
> example runs. (The weights are extremely small, but not literally
> zero.)

thanks, i will get the cvs version :)

>
> However, the example is rather odd and this may explain gretl's
> complaints. The auxiliary regression for hsk estimation produces a
> perfect fit with the original dataset (T = 226), since you have
> 151 usable observations and 151 regressors (75 lags, 75 squares of
> lags, plus constant). Adding another observation gives one degree
> of freedom to the auxiliary regression, which seems to help
> matters.

the 151 observations with 151 regressors is only an example of the
problem i got, with 210 observations or more i got the same problem (I
added 1 observations at a time, and more I add observations more the
(Continue reading)

Allin Cottrell | 4 May 2010 16:00
Picon
Favicon

Re: error with heteroscedacity function.


On Tue, 4 May 2010, denis joubert wrote:

> 2010/5/3 Allin Cottrell <cottrell@...>:
> > The test libgretl was using for "weights all zero" was not really
> > appropriate: it was that the sum of squares of the weight series
> > equals machine zero. I've now modified this in CVS and your
> > example runs. (The weights are extremely small, but not literally
> > zero.)
>
> thanks, i will get the cvs version :)
> >
> > However, the example is rather odd and this may explain gretl's
> > complaints. The auxiliary regression for hsk estimation produces a
> > perfect fit with the original dataset (T = 226), since you have
> > 151 usable observations and 151 regressors (75 lags, 75 squares of
> > lags, plus constant). Adding another observation gives one degree
> > of freedom to the auxiliary regression, which seems to help
> > matters.
>
> the 151 observations with 151 regressors is only an example of the
> problem i got, with 210 observations or more i got the same problem (I
> added 1 observations at a time, and more I add observations more the
> problem shows up)
>
> does it mean i don't need to use hsk and should use only the auxiliary
> regression function in order to predict next values ?

No, the auxiliary regression is predicting the error variance, not
the dependent variable. I wonder, though, why you reckon you need
(Continue reading)

John C Frain | 4 May 2010 17:50
Picon

Re: Arima with exogenous variables.

 Allin

The account of ARMA/ARIMA modelling is apart from this minor point
very clear.  If you are considering adding a footnote to cover it you
might also consider the following point,  If I add a time trend to the
data set then the following two commands give the same results (apart
from the labels in the results table.

arima p 1 q ; y X const
arima p 1 q ; y X time

Best Regards

John

On 3 May 2010 19:58, Allin Cottrell <cottrell@...> wrote:
>
> On Mon, 3 May 2010, John C Frain wrote:
>
>> According to the users guide (see equation 20,8 on page 147 of the May
>> 2010 version) the instruction
>>
>> arima 0 1 1 ; 0 1 1 ; ln_vols ln_vol_exm_s ln_price ban_e const
>>
>> should produce the same results as
>>
>> arima 0 0 1 ; 0 0 1 ; d_sd_ln_vols  d_sd_ln_vol_e  d_sd_ln_price  d_sd_ban_e
>>
>> I am presuming that the constant is differenced along with the other x
>> variables.
(Continue reading)

denis joubert | 4 May 2010 18:01
Picon

Re: error with heteroscedacity function.

2010/5/4 Allin Cottrell <cottrell@...>:
>
> On Tue, 4 May 2010, denis joubert wrote:
>
>> 2010/5/3 Allin Cottrell <cottrell@...>:
>> > The test libgretl was using for "weights all zero" was not really
>> > appropriate: it was that the sum of squares of the weight series
>> > equals machine zero. I've now modified this in CVS and your
>> > example runs. (The weights are extremely small, but not literally
>> > zero.)
>>
>> thanks, i will get the cvs version :)
>> >
>> > However, the example is rather odd and this may explain gretl's
>> > complaints. The auxiliary regression for hsk estimation produces a
>> > perfect fit with the original dataset (T = 226), since you have
>> > 151 usable observations and 151 regressors (75 lags, 75 squares of
>> > lags, plus constant). Adding another observation gives one degree
>> > of freedom to the auxiliary regression, which seems to help
>> > matters.
>>
>> the 151 observations with 151 regressors is only an example of the
>> problem i got, with 210 observations or more i got the same problem (I
>> added 1 observations at a time, and more I add observations more the
>> problem shows up)
>>
>> does it mean i don't need to use hsk and should use only the auxiliary
>> regression function in order to predict next values ?
>
> No, the auxiliary regression is predicting the error variance, not
(Continue reading)

denis joubert | 5 May 2010 00:47
Picon

Re: error with heteroscedacity function.

Hello Allin,

I think there is a bug into laggenr_from_to or i don't know to use it.
when you call it twice on 2 different id of variable(already stored
into Z), it does restart the position of the returned list.
For example :
listlag1 = laggenr_from_to(1, 1, 50, &m_Z, m_datainfo, &err);
listlag2 = laggenr_from_to(2, 1, 50, &m_Z, m_datainfo, &err);
return the same numbers into listlag1 and listlag2.

I tried to fix myself the problem but i'm going to sleep. so i stop
not far further than get_transform() (called by laggenr, called by
laggenr_from_to)

2010/5/4 denis joubert <denis.joubert@...>:
> 2010/5/4 Allin Cottrell <cottrell@...>:
>>
>> On Tue, 4 May 2010, denis joubert wrote:
>>
>>> 2010/5/3 Allin Cottrell <cottrell@...>:
>>> > The test libgretl was using for "weights all zero" was not really
>>> > appropriate: it was that the sum of squares of the weight series
>>> > equals machine zero. I've now modified this in CVS and your
>>> > example runs. (The weights are extremely small, but not literally
>>> > zero.)
>>>
>>> thanks, i will get the cvs version :)
>>> >
>>> > However, the example is rather odd and this may explain gretl's
>>> > complaints. The auxiliary regression for hsk estimation produces a
(Continue reading)

Allin Cottrell | 5 May 2010 02:15
Picon
Favicon

Re: error with heteroscedacity function.


On Wed, 5 May 2010, denis joubert wrote:

> I think there is a bug into laggenr_from_to or i don't know to use it.
> when you call it twice on 2 different id of variable(already stored
> into Z), it does restart the position of the returned list.
> For example :
> listlag1 = laggenr_from_to(1, 1, 50, &m_Z, m_datainfo, &err);
> listlag2 = laggenr_from_to(2, 1, 50, &m_Z, m_datainfo, &err);
> return the same numbers into listlag1 and listlag2.

You will have to show me a small but complete program that
produces unexpected results to make me believe there is a bug. The
following program produces two distinct lists: 3 lags of the first
variable, then 3 lags of the second.

#include <gretl/libgretl.h>

int main (void)
{
    DATAINFO *m_datainfo;
    double **m_Z;
    int *laglist1, *laglist2;
    PRN *prn;
    int err = 0;

    libgretl_init();

    prn = gretl_print_new(GRETL_PRINT_STDOUT, NULL);

(Continue reading)

denis joubert | 5 May 2010 09:35
Picon

Re: error with heteroscedacity function.

Hello Allin,
I found my bug, if m_datainfo->varname[2] is not set, it give back the
same list at laglist2.
example
replace in your example:
 strcpy(m_datainfo->varname[1], "y1");
   strcpy(m_datainfo->varname[2], "y2");
by
 strcpy(m_datainfo->varname[0], "y1");
   strcpy(m_datainfo->varname[1], "y2");

and you'll get my problem.
I'm not sure it's a bug, but it's a big trap.

thanks

2010/5/5 Allin Cottrell <cottrell <at> wfu.edu>:
>
> On Wed, 5 May 2010, denis joubert wrote:
>
>> I think there is a bug into laggenr_from_to or i don't know to use it.
>> when you call it twice on 2 different id of variable(already stored
>> into Z), it does restart the position of the returned list.
>> For example :
>> listlag1 = laggenr_from_to(1, 1, 50, &m_Z, m_datainfo, &err);
>> listlag2 = laggenr_from_to(2, 1, 50, &m_Z, m_datainfo, &err);
>> return the same numbers into listlag1 and listlag2.
>
> You will have to show me a small but complete program that
> produces unexpected results to make me believe there is a bug. The
(Continue reading)


Gmane