Dear all

After digging, I found my problem seems from incorrect path under Windows
environment. But I am not sure where the error should attribute to.

I test the code one-line by one-line.

It is found that the shell commands failed:
   ! cd "@tramodir"
so that this line does not work at all
  ! "@tramo" -i sername -k sername.ser


And the (part of) relevant code was modified as follows:

  if WIN32
    set shelldir @tramodir\graph\series
    ! del /Q *.t
    #    ! cd "@tramodir"
    set shelldir @tramodir

    ! "@tramo" -i sername -k sername.ser
    #    ! cd "@tramodir"\graph\series
    set shelldir @tramodir\graph\series

    ! echo "ser_adj" > sername.txt
    ! type "@tramodir\ausentesp" >> sername.txt
    ! if exist xlin.t. (more +6 xlin.t >> sername.txt) else (more +6
xorigt.t >> sername.txt)
    ! type "@tramodir\ausentesf" >> sername.txt
    append "@tramodir\graph\series\sername.txt"
  else
  ....

Now I can get the result:

? QNC_adj = tramolin(QNC)
Generated series QNC_adj (ID 12)

But I am not sure the QNC_adj is correctly created.

Yi-Nung

2009/4/27 yinung at Gmail <yinung.cycu(a)gmail.com>

> >>Please, Yi-Nung, try it with this package and report any error. I will
> try to
> >>help.
>
> Thanks for this package tramolin.
>
> Now I can test the uploaded package at home. But an error occurs:
>
> error in function tramolin
> >append "C:\Documents and Settings\Administrator\Application
> Data\gretl\tramo\graph\series\sername.txt"
>
> An in other pop-up windows, it says
>
> ? qnc_adj = tramolin(QNC)
> Invalid data file
> Data error
>
> Thanks.
>
> Yi-Nung
>
>
> 2009/4/27 Ignacio Diaz-Emparanza <ignacio.diaz-emparanza(a)ehu.es>
>
>> El Saturday 25 April 2009 21:07:06 Allin Cottrell escribió:
>>
>> > On Sat, 25 Apr 2009, Allin Cottrell wrote:
>> > > On Sat, 25 Apr 2009, Ofer Cornfeld wrote:
>> > > > I have series in Gretl that need to be corrected according to TRAMO
>> > > > with the following rules...
>> > > >
>> > > > How can I activate it via a script? (As the above, needs to be done
>> on
>> > > > a regular basis).
>> > >
>> > > Sorry, can't be done via gretl at present, though that could be
>> > > added...
>> >
>> > I had forgotten that Ignacio Diaz-Emparanza worked on this sort of
>> > issue, and came up with a clever script.  I'm attaching a copy;
>> > you should be able to modify it for your purposes.
>> >
>> > Allin Cottrell
>>
>> I finally wrote it as a function package. You may find it opening with the
>> gretl menu: file/function files/on server/ tramolin
>> this has the more updated and corrected script.
>>
>> Please, Yi-Nung, try it with this package and report any error. I will try
>> to
>> help.
>>
>> --
>> Ignacio Diaz-Emparanza
>> DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
>> UPV/EHU
>> Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
>> T.: +34 946013732 | F.: +34 946013754
>> www.et.bs.ehu.es
>>
>> _______________________________________________
>> Gretl-users mailing list
>> Gretl-users(a)lists.wfu.edu
>> http://lists.wfu.edu/mailman/listinfo/gretl-users
>>
>
>
Dear all

After digging, I found my problem seems from incorrect path under Windows environment. But I am not sure where the error should attribute to.

I test the code one-line by one-line.

It is found that the shell commands failed:
   ! cd "@tramodir"
so that this line does not work at all
  ! "@tramo" -i sername -k sername.ser


And the (part of) relevant code was modified as follows:

  if WIN32
    set shelldir @tramodir\graph\series
    ! del /Q *.t
    #    ! cd "@tramodir"
    set shelldir @tramodir

    ! "@tramo" -i sername -k sername.ser
    #    ! cd "@tramodir"\graph\series
    set shelldir @tramodir\graph\series
 
    ! echo "ser_adj" > sername.txt
    ! type "@tramodir\ausentesp" >> sername.txt
    ! if exist xlin.t. (more +6 xlin.t >> sername.txt) else (more +6 xorigt.t >> sername.txt)
    ! type "@tramodir\ausentesf" >> sername.txt
    append "@tramodir\graph\series\sername.txt"
  else
  ....

Now I can get the result:

? QNC_adj = tramolin(QNC)
Generated series QNC_adj (ID 12)

But I am not sure the QNC_adj is correctly created.

Yi-Nung

2009/4/27 yinung at Gmail <yinung.c...@gmail.com>
>>Please, Yi-Nung, try it with this package and report any error. I will try to
>>help.

Thanks for this package tramolin.

Now I can test the uploaded package at home. But an error occurs:

error in function tramolin
>append "C:\Documents and Settings\Administrator\Application Data\gretl\tramo\graph\series\sername.txt"


An in other pop-up windows, it says

? qnc_adj = tramolin(QNC)
Invalid data file
Data error

Thanks.

Yi-Nung


2009/4/27 Ignacio Diaz-Emparanza <ignacio.diaz-empara...@ehu.es>
El Saturday 25 April 2009 21:07:06 Allin Cottrell escribió:

> On Sat, 25 Apr 2009, Allin Cottrell wrote:
> > On Sat, 25 Apr 2009, Ofer Cornfeld wrote:
> > > I have series in Gretl that need to be corrected according to TRAMO
> > > with the following rules...
> > >
> > > How can I activate it via a script? (As the above, needs to be done on
> > > a regular basis).
> >
> > Sorry, can't be done via gretl at present, though that could be
> > added...
>
> I had forgotten that Ignacio Diaz-Emparanza worked on this sort of
> issue, and came up with a clever script.  I'm attaching a copy;
> you should be able to modify it for your purposes.
>
> Allin Cottrell

I finally wrote it as a function package. You may find it opening with the
gretl menu: file/function files/on server/ tramolin
this has the more updated and corrected script.

Please, Yi-Nung, try it with this package and report any error. I will try to
help.

--
Ignacio Diaz-Emparanza
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU
Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
T.: +34 946013732 | F.: +34 946013754
www.et.bs.ehu.es

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


Reply via email to