Artur T. | 2 Feb 2010 17:41

problem using GJR-garch function package

Hello,

I just tried to work with the provided GJR-garch function package.

There seems to arise a problem if range of periods is restricted. 
Changing the first observation leads to the error: 
error in function garchm
 > end mle

As soon as the original date is restored, the problem does not arise 
anymore.

Best,
Artur
yinung at Gmail | 2 Feb 2010 18:09
Picon
Gravatar

Re: problem using GJR-garch function package

Hi, Artur

Thanks for your report. I can repeat the error so that I will check
what's wrong with it.

Yi-Nung

2010/2/3 Artur T. <artur.tarassow@...>:
> Hello,
>
> I just tried to work with the provided GJR-garch function package.
>
> There seems to arise a problem if range of periods is restricted.
> Changing the first observation leads to the error:
> error in function garchm
>  > end mle
>
> As soon as the original date is restored, the problem does not arise
> anymore.
>
>
> Best,
> Artur
> _______________________________________________
> Gretl-users mailing list
> Gretl-users@...
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>

(Continue reading)

Ralph.M.Rodriguez | 2 Feb 2010 19:01

Ralph M Rodriguez/PO/KAIPERM is out of the office.

I will be out of the office starting 01/29/2010 and will not return until 02/04/2010.

Hi All, I will be out of the offcie from this afternoon until Feb 3. Returning to the office on Thursday Feb 4, 2010. Please, if you have an immediate question regarding Cost Model or Construction Economics, please contact Brad A Njus, 510 625 4595, with your questions.
Ralph

<div>
<p>I will be out of the office starting  01/29/2010 and will not return until 02/04/2010.<br><br>
Hi All, I will be out of the offcie from this afternoon until Feb 3.  Returning to the office on Thursday Feb 4, 2010.  Please, if you have an immediate question regarding Cost Model or Construction Economics, please contact Brad A Njus, 510 625 4595, with your questions. <br>
Ralph</p>
</div>
Summers, Peter | 2 Feb 2010 20:25
Picon
Favicon

scalar in loop condition

Hi folks,

 

The following has me at a complete loss. This script runs fine:

 

\begin{script}

# program to perform calculations in problem 1.2 of Davidson & MacKinnon

 

nlist = {10; 100; 1000; 10000}

n = rows(nlist)

means = zeros(n,2)

 

loop i=1..n --quiet

    jnk1 = cauchy(nlist[i])

    jnk2 = mnormal(nlist[i],1)

    means[i,] = {meanc(jnk1), meanc(jnk2)}

endloop

 

print means

\end{script}

(“Cauchy” is a function I wrote – see attached).

 

However, when I try to run the following one, I get an error saying “undefined variable nreps in loop condition”. This happens even though the script output says “generated scalar nreps = 1:”

 

\begin{script}

n = 25; # sample size

nreps = 1; # number of replications

 

beta1 = 1;

beta2 = 0.8; # true values of parameters

 

b1 = 0;

b2 = 0;

 

nulldata n

 

loop ii=1..nreps

    # simulate data

    series y = zeros(n,1)

    series u = normal()

 

    #y[1] = beta1 + u[1]

 

    loop jj=2..n --quiet

        y[jj] = beta1 + beta2[jj-1] + u[jj]

    endloop

 

    series y1 = y(-1)

 

    # run regression

    ols y 0 y1

    b1 = b1 + $coeff(1)

    b2 = b2 + $coeff(2)

print b1 b2

endloop

\end{script}

 

I’ve attached both scripts. Note that I’ve just started on ETM_3_1, so there may well be other errors (still getting used to gretl scripts). I can’t for the life of me figure out why either both work or both don’t run. I’m using gretl 1.8.7 on WinXP.

 

TIA,

 

PS

===============================

Dr. Peter Summers

Assistant Professor

Department of Economics

Texas TechUniversity

===============================

 

Attachment (ETM_3_1.inp): application/octet-stream, 972 bytes
Attachment (ETM_1_2.inp): application/octet-stream, 447 bytes
<div>

<div class="Section1">

<p class="MsoNormal"><span>Hi folks,<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>The following has me at a complete loss. This script runs
fine:<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>\begin{script}<p></p></span></p>

<p class="MsoNormal"><span># program to perform calculations in problem 1.2 of Davidson
&amp; MacKinnon<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>nlist = {10; 100; 1000; 10000}<p></p></span></p>

<p class="MsoNormal"><span>n = rows(nlist)<p></p></span></p>

<p class="MsoNormal"><span>means = zeros(n,2)<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>loop i=1..n --quiet <p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; jnk1 = cauchy(nlist[i])<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; jnk2 = mnormal(nlist[i],1)<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; means[i,] = {meanc(jnk1), meanc(jnk2)}<p></p></span></p>

<p class="MsoNormal"><span>endloop<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>print means<p></p></span></p>

<p class="MsoNormal"><span>\end{script}<p></p></span></p>

<p class="MsoNormal"><span>(&ldquo;Cauchy&rdquo; is a function I wrote &ndash; see attached).<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>However, when I try to run the following one, I get an error
saying &ldquo;undefined variable nreps in loop condition&rdquo;. This happens
even though the script output says &ldquo;generated scalar nreps = 1:&rdquo; <p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>\begin{script}<p></p></span></p>

<p class="MsoNormal"><span>n = 25; # sample size<p></p></span></p>

<p class="MsoNormal"><span>nreps = 1; # number of replications<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>beta1 = 1;<p></p></span></p>

<p class="MsoNormal"><span>beta2 = 0.8; # true values of parameters<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>b1 = 0;<p></p></span></p>

<p class="MsoNormal"><span>b2 = 0;<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>nulldata n<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>loop ii=1..nreps <p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; # simulate data<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; series y = zeros(n,1)<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; series u = normal()<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; #y[1] = beta1 + u[1]<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; loop jj=2..n --quiet<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y[jj] = beta1 + beta2[jj-1] + u[jj]<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; endloop<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; series y1 = y(-1)<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; # run regression<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; ols y 0 y1<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; b1 = b1 + $coeff(1)<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; b2 = b2 + $coeff(2)<p></p></span></p>

<p class="MsoNormal"><span>print b1 b2<p></p></span></p>

<p class="MsoNormal"><span>endloop<p></p></span></p>

<p class="MsoNormal"><span>\end{script}<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>I&rsquo;ve attached both scripts. Note that I&rsquo;ve just
started on ETM_3_1, so there may well be other errors (still getting used to
gretl scripts). I can&rsquo;t for the life of me figure out why either both
work or both don&rsquo;t run. I&rsquo;m using gretl 1.8.7 on WinXP.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>TIA,<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>PS<p></p></span></p>

<p class="MsoNormal"><span>===============================<p></p></span></p>

<p class="MsoNormal"><span>Dr. Peter Summers<p></p></span></p>

<p class="MsoNormal"><span>Assistant Professor<p></p></span></p>

<p class="MsoNormal"><span>Department of Economics</span><p></p></p>

<p class="MsoNormal"><span>Texas</span><span> TechUniversity</span><span><p></p></span></p>

<p class="MsoNormal"><span>===============================<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

</div>
Summers, Peter | 2 Feb 2010 20:57
Picon
Favicon

Re: scalar in loop condition

A quick follow-up with another error.

 

As part of trying to figure out the initial error, I moved the nulldata command inside the first loop and got an error saying it’s not available in loop mode. Ok, but moving ‘nulldata’ back to where it initially was now results in the same error (ie, gretl still thinks nulldata is inside the first loop). Closing the script  & reopening doesn’t help.

 

PS

 

From: gretl-users-bounces-npDYnXcwJHngpn9g0Uvcdg@public.gmane.org [mailto:gretl-users-bounces-npDYnXcwJHngpn9g0Uvcdg@public.gmane.org] On Behalf Of Summers, Peter
Sent: Tuesday, February 02, 2010 1:25 PM
To: Gretl list
Subject: [Gretl-users] scalar in loop condition

 

Hi folks,

 

The following has me at a complete loss. This script runs fine:

 

\begin{script}

# program to perform calculations in problem 1.2 of Davidson & MacKinnon

 

nlist = {10; 100; 1000; 10000}

n = rows(nlist)

means = zeros(n,2)

 

loop i=1..n --quiet

    jnk1 = cauchy(nlist[i])

    jnk2 = mnormal(nlist[i],1)

    means[i,] = {meanc(jnk1), meanc(jnk2)}

endloop

 

print means

\end{script}

(“Cauchy” is a function I wrote – see attached).

 

However, when I try to run the following one, I get an error saying “undefined variable nreps in loop condition”. This happens even though the script output says “generated scalar nreps = 1:”

 

\begin{script}

n = 25; # sample size

nreps = 1; # number of replications

 

beta1 = 1;

beta2 = 0.8; # true values of parameters

 

b1 = 0;

b2 = 0;

 

nulldata n

 

loop ii=1..nreps

    # simulate data

    series y = zeros(n,1)

    series u = normal()

 

    #y[1] = beta1 + u[1]

 

    loop jj=2..n --quiet

        y[jj] = beta1 + beta2[jj-1] + u[jj]

    endloop

 

    series y1 = y(-1)

 

    # run regression

    ols y 0 y1

    b1 = b1 + $coeff(1)

    b2 = b2 + $coeff(2)

print b1 b2

endloop

\end{script}

 

I’ve attached both scripts. Note that I’ve just started on ETM_3_1, so there may well be other errors (still getting used to gretl scripts). I can’t for the life of me figure out why either both work or both don’t run. I’m using gretl 1.8.7 on WinXP.

 

TIA,

 

PS

===============================

Dr. Peter Summers

Assistant Professor

Department of Economics

Texas TechUniversity

===============================

 

<div>

<div class="Section1">

<p class="MsoNormal"><span>A quick follow-up with another error.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>As part of trying to figure out the
initial error, I moved the nulldata command inside the first loop and got an
error saying it&rsquo;s not available in loop mode. Ok, but moving &lsquo;nulldata&rsquo; back to
where it initially was now results in the same error (ie, gretl still thinks
nulldata is inside the first loop). Closing the script&nbsp; &amp; reopening doesn&rsquo;t
help.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>PS<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<div>

<div class="MsoNormal" align="center"><span>

</span></div>

<p class="MsoNormal"><span>From:</span><span>
gretl-users-bounces@... [mailto:gretl-users-bounces@...] <span>On Behalf Of </span>Summers,
 Peter<br><span>Sent:</span> Tuesday, February 02, 2010
1:25 PM<br><span>To:</span> Gretl
 list<br><span>Subject:</span> [Gretl-users] scalar in
loop condition</span><p></p></p>

</div>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Hi folks,<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>The following has me at a complete loss. This script runs
fine:<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>\begin{script}<p></p></span></p>

<p class="MsoNormal"><span># program to perform calculations in problem 1.2 of Davidson
&amp; MacKinnon<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>nlist = {10; 100; 1000; 10000}<p></p></span></p>

<p class="MsoNormal"><span>n = rows(nlist)<p></p></span></p>

<p class="MsoNormal"><span>means = zeros(n,2)<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>loop i=1..n --quiet <p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; jnk1 = cauchy(nlist[i])<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; jnk2 = mnormal(nlist[i],1)<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; means[i,] = {meanc(jnk1), meanc(jnk2)}<p></p></span></p>

<p class="MsoNormal"><span>endloop<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>print means<p></p></span></p>

<p class="MsoNormal"><span>\end{script}<p></p></span></p>

<p class="MsoNormal"><span>(&ldquo;Cauchy&rdquo; is a function I wrote &ndash; see attached).<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>However, when I try to run the following one, I get an error
saying &ldquo;undefined variable nreps in loop condition&rdquo;. This happens even though
the script output says &ldquo;generated scalar nreps = 1:&rdquo; <p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>\begin{script}<p></p></span></p>

<p class="MsoNormal"><span>n = 25; # sample size<p></p></span></p>

<p class="MsoNormal"><span>nreps = 1; # number of replications<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>beta1 = 1;<p></p></span></p>

<p class="MsoNormal"><span>beta2 = 0.8; # true values of parameters<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>b1 = 0;<p></p></span></p>

<p class="MsoNormal"><span>b2 = 0;<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>nulldata n<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>loop ii=1..nreps <p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; # simulate data<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; series y = zeros(n,1)<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; series u = normal()<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; #y[1] = beta1 + u[1]<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; loop jj=2..n --quiet<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y[jj] = beta1 +
beta2[jj-1] + u[jj]<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; endloop<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; series y1 = y(-1)<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; # run regression<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; ols y 0 y1<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; b1 = b1 + $coeff(1)<p></p></span></p>

<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; b2 = b2 + $coeff(2)<p></p></span></p>

<p class="MsoNormal"><span>print b1 b2<p></p></span></p>

<p class="MsoNormal"><span>endloop<p></p></span></p>

<p class="MsoNormal"><span>\end{script}<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>I&rsquo;ve attached both scripts. Note that I&rsquo;ve just started on
ETM_3_1, so there may well be other errors (still getting used to gretl
scripts). I can&rsquo;t for the life of me figure out why either both work or both
don&rsquo;t run. I&rsquo;m using gretl 1.8.7 on WinXP.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>TIA,<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>PS<p></p></span></p>

<p class="MsoNormal"><span>===============================<p></p></span></p>

<p class="MsoNormal"><span>Dr. Peter Summers<p></p></span></p>

<p class="MsoNormal"><span>Assistant Professor<p></p></span></p>

<p class="MsoNormal"><span>Department of Economics</span><p></p></p>

<p class="MsoNormal"><span>Texas</span><span> TechUniversity</span><span><p></p></span></p>

<p class="MsoNormal"><span>===============================<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

</div>

</div>
Berend Hasselman | 2 Feb 2010 21:11
Picon
Picon
Favicon

Re: scalar in loop condition


On 02-02-2010, at 20:25, Summers, Peter wrote:

> Hi folks,
>  
> The following has me at a complete loss.
>  
> \begin{script}
> n = 25; # sample size
> nreps = 1; # number of replications
>  
> beta1 = 1;
> beta2 = 0.8; # true values of parameters
>  
> b1 = 0;
> b2 = 0;
>  
> nulldata n
>  

This nulldata nulls your data. So now nreps is no longer exists.
The nulldata should be placed at the top of the script.

> loop ii=1..nreps
>     # simulate data
>     series y = zeros(n,1)
>     series u = normal()
>  
>     #y[1] = beta1 + u[1]
>  
>     loop jj=2..n --quiet
>         y[jj] = beta1 + beta2[jj-1] + u[jj]

This does not agree with your specification above and will give an  error since you are indexing a scalar.
I think this should be:         

 y[jj] = beta1 + beta2 + u[jj]

See attached corrected script.

Berend

Attachment (ETM_3_1.inp): application/octet-stream, 944 bytes


Allin Cottrell | 2 Feb 2010 21:25
Picon
Favicon

Re: scalar in loop condition


On Tue, 2 Feb 2010, Summers, Peter wrote:

> However, when I try to run the following one, I get an error
> saying "undefined variable nreps in loop condition". This
> happens even though the script output says "generated scalar
> nreps = 1:"
>
> \begin{script}
> n = 25; # sample size
> nreps = 1; # number of replications
>
> beta1 = 1;
> beta2 = 0.8; # true values of parameters
>
> b1 = 0;
> b2 = 0;
>
> nulldata n
>
> loop ii=1..nreps

You just deleted nreps via the nulldata command.  Use
nulldata --preserve to preserve existing scalars and matrices.

BTW, the trailing semi-colons are not needed (though they
shouldn't do any harm).

Allin.
Berend Hasselman | 2 Feb 2010 21:31
Picon
Picon
Favicon

Re: scalar in loop condition


On 02-02-2010, at 21:11, Berend Hasselman wrote:

> 
> This does not agree with your specification above and will give an  error since you are indexing a scalar.
> I think this should be:         
> 
> y[jj] = beta1 + beta2 + u[jj]
> 

I should have written:

y[jj] = beta1 + beta2 * y[jj-1] + u[jj]

It's correct in the script.

Berend

Summers, Peter | 2 Feb 2010 21:51
Picon
Favicon

Re: scalar in loop condition

Thanks all, it's working now.

However, I did have to close gretl then re-open it to get rid of the "nulldata not available in loop" error.

PS

-----Original Message-----
From: gretl-users-bounces@...
[mailto:gretl-users-bounces@...] On Behalf Of Berend Hasselman
Sent: Tuesday, February 02, 2010 2:32 PM
To: Gretl list
Subject: Re: [Gretl-users] scalar in loop condition

On 02-02-2010, at 21:11, Berend Hasselman wrote:

> 
> This does not agree with your specification above and will give an  error since you are indexing a scalar.
> I think this should be:         
> 
> y[jj] = beta1 + beta2 + u[jj]
> 

I should have written:

y[jj] = beta1 + beta2 * y[jj-1] + u[jj]

It's correct in the script.

Berend

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

Chris | 2 Feb 2010 22:39

ODBC troubles

Hi,

I'm having some trouble getting data into gretl through ODBC. I have a fairly large sql statement, so I'm importing it from a file. When I run the data command I get an error and it halts. Here's the command script:
nulldata 160
setobs 5 2001:1 --time-series
open dsn=guestCalgary user=####### password=##### --odbc
string QRY1 = readfile("C:/gretl/maxbufftemp.txt")
data maxbufftemp obs-format-"%d" <at> QRY1 --odbc

gives me this error:
gretl version 1.8.7
Current session: 2010-02-02 14:34
? nulldata 160
periodicity: 1, maxobs: 160,
observations range: 1-160
? setobs 5 2001:1 --time-series
Full data range: 2001 - 2160 (n = 160)

? open dsn=guestCalgary user=##### password=#### --odbc
Connected to ODBC data source 'guestCalgary'
? string QRY1 = readfile("C:/gretl/maxbufftemp.txt")
Replaced string QRY1
? data maxbufftemp obs-format-"%d" <at> QRY1 --odbc

Error executing script: halting
> data maxbufftemp obs-format-"%d" <at> QRY1 --odbc

I have been able to get data from the db with simple queries, so I was wondering, how do I get gretl to tell me what is stored in QRY1? I've tried print, but I can't get it to work and I think that would be the obvious place to start (verifying that my sql call got imported properly). next, I think I might be messing up the obs-format portion of the call. The output from the big sql query is 2 columns, 1 8 digit identifier and 1 number with 2 decimal places.


Also, are there any plans to implement more robust ODBC support? It would be great to be able to import multiple variables at once.


Thanks,

Chris

<div><p>Hi,<br><br>I'm having some trouble getting data into gretl through ODBC. I have a fairly large sql statement, so I'm importing it from a file. When I run the data command I get an error and it halts. Here's the command script:<br>
nulldata 160<br>setobs 5 2001:1 --time-series<br>open dsn=guestCalgary user=####### password=##### --odbc<br>string QRY1 = readfile("C:/gretl/maxbufftemp.txt")<br>data maxbufftemp obs-format-"%d"  <at> QRY1 --odbc<br><br>gives me this error:<br>gretl version 1.8.7<br>Current session: 2010-02-02 14:34<br>? nulldata 160<br>periodicity: 1, maxobs: 160,<br>observations range: 1-160<br>? setobs 5 2001:1 --time-series<br>Full data range: 2001 - 2160 (n = 160)<br><br>? open dsn=guestCalgary user=##### password=#### --odbc<br>Connected to ODBC data source 'guestCalgary'<br>? string QRY1 = readfile("C:/gretl/maxbufftemp.txt")<br>Replaced string QRY1<br>? data maxbufftemp obs-format-"%d"  <at> QRY1 --odbc<br><br>Error executing script: halting<br>&gt; data maxbufftemp obs-format-"%d"  <at> QRY1 --odbc<br><br>I have been able to get data from the db with simple queries, so I was wondering, how do I get gretl to tell me what is stored in QRY1? I've tried print, but I can't get it to work and I think that would be the obvious place to start (verifying that my sql call got imported properly). next, I think I might be messing up the obs-format portion of the call. The output from the big sql query is 2 columns, 1 8 digit identifier and 1 number with 2 decimal places.<br><br><br>Also, are there any plans to implement more robust ODBC support? It would be great to be able to import multiple variables at once.<br><br><br>Thanks,<br><br>Chris<br><br></p></div>

Gmane