Chow test in GUI
by yinung@Gmail
Dear all
I found that the Chow test via GUI has a (potential) bug in the CVS.
The following script runs very well in command line
<script>
open djclose
series r=ldiff(djclose)*100
series d1=(r>0)
model1 <- ols r const r(-1)
chow d1 --dummy
</script>
The results come as follows
? chow d1 --dummy
Augmented regression for Chow test
OLS, using observations 1980/01/04-1989/12/29 (T = 2526)
Dependent variable: r
coefficient std. error t-ratio p-value
------…
[View More]---------------------------------------------------
const -0.737184 0.0252908 -29.15 3.13e-161 ***
r_1 0.111833 0.0249682 4.479 7.83e-06 ***
d1 1.50286 0.0350300 42.90 1.87e-302 ***
d1_r_1 -0.135231 0.0313858 -4.309 1.71e-05 ***
But when I open model1 via GUI and execute Chow test. In the
subsequent dialog window, I choose d1 under the listbox of the option
"Name of dummy variable to use:" I got results:
Augmented regression for Chow test
OLS, using observations 1980/01/04-1989/12/29 (T = 2526)
Dependent variable: r
coefficient std. error t-ratio p-value
-------------------------------------------------------
const 0.0291736 0.0325775 0.8955 0.3706
r_1 0.0526902 0.0339163 1.554 0.1204
splitdum 0.0357027 0.0460326 0.7756 0.4381
sd_r_1 -0.0505990 0.0418874 -1.208 0.2272
splitdum should not occur here under the option of a dummy variable.
I run many tests and found that if I generate another dummy variable,
say, d2 to be selected under the listbox of the option "Name of dummy
variable to use", it works normally.
Yi-Nung Yang
[View Less]
14 years, 11 months
Cross Periodogram Calculation
by savos schmagges
Here's my first try to calculate a Cross Periodogram with Gretl. It's obviously not perfect, but I think it is a bit useful. Maybe someone feels adressed to continue the development for a cross spectral density or something else ...the values are (nearly) the same as with Statistica.
_________________________________________________________
nulldata 200
#generate two related processes
series X=0
series Y=0
X=0.9*X(-1)+normal()
Y= 0.4*X + 0.75*Y(-1)+normal()
X1={ X }
Y1={ Y }
Fx=…
[View More]fft(X1)
Fy=fft(Y1)
#lambda = seq(1,($nobs/2))'.*(1/$nobs)
series a=Fx[,1]
series b=Fx[,2]
series c=Fy[,1]
series d=Fy[,2]
#Computes the cross-periodogram with x as a dependent
series crossxy_re=(a*c+b*d)/($nobs/2)
series crossxy_im=(b*c-a*d)/($nobs/2)
#Computes the cross-periodogram with y as a denpendent (imaginary part - the real part is the same as with x as a dependent)
series crossyx_im=(d*a-c*b)/($nobs/2)
delete a b c d
_________________________________________________________
Kind regards
_________________________________________________________________
http://redirect.gimas.net/?n=M1001xFotos2
Dein Santa Claus hat rote Augen? Jetzt X-Mas-Fotos bearbeiten!
[View Less]
14 years, 11 months
Periodogram Values - Comparison with Statistica 9.0
by savos schmagges
Hello
i have a question concerning the periodogram values calculated by gretl.
I have checked the values with Statistica, but they are differing by the factor 12.
What is the reason for that? How can the values be reconciled?
The examined time series is a self simulated fractional noise process with d=0.3
The values of the periodogram are:
Frequency Gretl Statistica
0.0628 0.10513 1.37585
0.1257 0.33793 4.32496
0.1885 0.4036 4.…
[View More]94240
0.2513 0.052776 0.69014
0.3142 0.092302 1.12479
0.377 1.1303 14.14518
0.4398 0.59085 7.33322
0.5027 0.042439 0.53758
0.5655 0.17057 2.17718
0.6283 0.087422 1.11835
0.6912 0.20416 2.60102
0.754 0.027218 0.33234
0.8168 0.25031 3.16315
0.8796 0.1242 1.54013
0.9425 0.072739 0.90462
1.0053 0.16789 2.13019
1.0681 0.023102 0.29269
1.131 0.068029 0.86771
1.1938 0.13164 1.66274
1.2566 0.12636 1.57903
1.3195 0.0087133 0.10941
1.3823 0.19369 2.43953
1.4451 0.09459 1.19182
1.508 0.0029963 0.03558
1.5708 0.11431 1.44594
1.6336 0.22137 2.78518
1.6965 0.49752 6.26625
1.7593 0.29826 3.76029
1.8221 0.15508 1.94260
1.885 0.054659 0.68098
1.9478 0.19383 2.42244
2.0106 0.094318 1.18797
2.0735 0.0022438 0.02752
2.1363 0.032733 0.41418
2.1991 0.017375 0.21442
2.2619 0.046278 0.58309
2.3248 0.02338 0.29811
2.3876 0.048485 0.61025
2.4504 0.30942 3.87426
2.5133 0.37511 4.72841
2.5761 0.085058 1.07409
2.6389 0.16668 2.09280
2.7018 0.0042564 0.05399
2.7646 0.18363 2.31775
2.8274 0.22937 2.87132
2.8903 0.020202 0.25371
2.9531 0.088127 1.09952
3.0159 0.013007 0.16047
3.0788 0.022892 0.28987
3.1416 0.015758 0.20137
Thank so much for your efforts
Kind regards
_________________________________________________________________
http://redirect.gimas.net/?n=M1001xHM2
Hotmail macht’s dir leicht: Versende vorgeschriebene Neujahrsgrüße
[View Less]
14 years, 11 months
gretl interacting with R
by Lars Pålsson-Syll
"Silence is golden, but my eyes ..."
Yes it was that simple (but maybe one could mention this little remedy in chapter 27.2 of the eminent Gretl Guide, since I guess I'm not the only amateur econometrician who has been confronted with this little problem?)
Thanks Allin (and Jack)!
Lars
Lars Palsson Syll
Professor of Civics
Malmo University
Sweden
14 years, 11 months
Re: [Gretl-users] gretl interacting with R
by Lars Pålsson-Syll
I have problem with getting gretl to interact with R. After launching R successfully I should (according to Gretl User's Guide) have a couple of commands being executed automatically (loading the dataset into an R-dataframe). Nothing of the sort happens.
Is it a problem with R or gretl (both the latest version of gretl and R otherwise runs perfectly) ?
Lars
Lars Palsson Syll
Professor of Civics
Malmo University
Sweden
>>> 10-02-04 18:07 >>>
Send Gretl-users mailing list …
[View More]submissions to
gretl-users(a)lists.wfu.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.wfu.edu/mailman/listinfo/gretl-users
or, via email, send a message with subject or body 'help' to
gretl-users-request(a)lists.wfu.edu
You can reach the person managing the list at
gretl-users-owner(a)lists.wfu.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gretl-users digest..."
Today's Topics:
1. Re: ODBC troubles (Allin Cottrell)
2. Re: ODBC troubles (Chris)
3. Re: ODBC troubles (Allin Cottrell)
4. Re: ODBC troubles (Chris)
5. Re: ODBC troubles (Allin Cottrell)
----------------------------------------------------------------------
Message: 1
Date: Wed, 3 Feb 2010 17:20:35 -0500 (EST)
From: Allin Cottrell
Subject: Re: [Gretl-users] ODBC troubles
To: Gretl list
Message-ID:
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 3 Feb 2010, Chris wrote:
> It should be an integer string that is the date without the / in
> them so feb 1 , 2007 stored as 20070201. In the case where I
> can import data into gretl I'm not even selecting that column
> though.
>
> The particular bit of data I'm pulling is stored as numeric(7,3)
> in an mssql server 2008. I believe we can read that as numeric
> precision 7, numeric scale 3
> For the small and simple test query I was using the data is stored as
> numeric(16,3) in the same sql server.
Thanks for persevering! We're making some progress -- you've
given me some ideas for making the manual more explicit. As to the
specifics:
First, on the "obs-format" business: the point of that is if you
want to screen the values coming in via ODBC and add only some of
them to the dataset. But if your identifiers look like "20070201"
and you use "%d" to grab the whole integer value, then _all_ the
ODBC values will be screened out (leaving nothing but missing
values or NAs in the input series). That's because a string like
"20070201" will not match any gretl observation identifier. Note
that the gretl obs identifiers are what you see in the leftmost
column if you do "print index --byobs" after doing "nulldata" and
"setobs".
So in this case it looks as if you want a straight one-column
import. And I need to research "numeric(7,3)" in mssql and see
what I can find. My first thought is that since gretl is asking
for SQL_C_DOUBLE, it's the server's fault that it's _not_ giving
gretl the values in the C double-precision format. But I'm not an
SQL expert and maybe it's not that simple.
Jack, any thoughts?
Allin Cottrell
------------------------------
Message: 2
Date: Wed, 3 Feb 2010 15:42:29 -0700
From: Chris
Subject: Re: [Gretl-users] ODBC troubles
To: Gretl list
Message-ID:
<93b3787f1002031442o6e0bae9ck1b47ea21c167c9ef(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Thanks,
That straightens out some things for me.
http://www.servers.net.in/Servers%20Archive-odbc%20sqlserver%20public%20m...
I suspect that is the reason this isn't working. If you have any suggestions
on how to get around this I would appreciate it.
Thanks,
Chris
On Wed, Feb 3, 2010 at 3:20 PM, Allin Cottrell wrote:
>
> On Wed, 3 Feb 2010, Chris wrote:
>
> > It should be an integer string that is the date without the / in
> > them so feb 1 , 2007 stored as 20070201. In the case where I
> > can import data into gretl I'm not even selecting that column
> > though.
> >
> > The particular bit of data I'm pulling is stored as numeric(7,3)
> > in an mssql server 2008. I believe we can read that as numeric
> > precision 7, numeric scale 3
> > For the small and simple test query I was using the data is stored as
> > numeric(16,3) in the same sql server.
>
> Thanks for persevering! We're making some progress -- you've
> given me some ideas for making the manual more explicit. As to the
> specifics:
>
> First, on the "obs-format" business: the point of that is if you
> want to screen the values coming in via ODBC and add only some of
> them to the dataset. But if your identifiers look like "20070201"
> and you use "%d" to grab the whole integer value, then _all_ the
> ODBC values will be screened out (leaving nothing but missing
> values or NAs in the input series). That's because a string like
> "20070201" will not match any gretl observation identifier. Note
> that the gretl obs identifiers are what you see in the leftmost
> column if you do "print index --byobs" after doing "nulldata" and
> "setobs".
>
> So in this case it looks as if you want a straight one-column
> import. And I need to research "numeric(7,3)" in mssql and see
> what I can find. My first thought is that since gretl is asking
> for SQL_C_DOUBLE, it's the server's fault that it's _not_ giving
> gretl the values in the C double-precision format. But I'm not an
> SQL expert and maybe it's not that simple.
>
> Jack, any thoughts?
>
> Allin Cottrell
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wfu.edu/pipermail/gretl-users/attachments/20100203/02a446a1/...
------------------------------
Message: 3
Date: Wed, 3 Feb 2010 17:51:49 -0500 (EST)
From: Allin Cottrell
Subject: Re: [Gretl-users] ODBC troubles
To: Gretl list
Message-ID:
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 3 Feb 2010, Chris wrote:
> That straightens out some things for me.
> http://www.servers.net.in/Servers%20Archive-odbc%20sqlserver%20public%20m...
> I suspect that is the reason this isn't working. If you have any suggestions
> on how to get around this I would appreciate it.
Ah, that reference is helpful. We'll see if we can find a way to
work around the bug in question. But I think that has to be in the
bowels of gretl's ODBC-import code; I don't think there's any way
to work around it at the level of user input.
Allin Cottrell
------------------------------
Message: 4
Date: Wed, 3 Feb 2010 15:58:32 -0700
From: Chris
Subject: Re: [Gretl-users] ODBC troubles
To: Gretl list
Message-ID:
<93b3787f1002031458o63140865mb4d7ab77877861ea(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
That's ok. It's about time for a Microsoft product to screw me over again; I
was just starting to think Microsoft products were decent and maybe I was
wrong to be a linux user at home for the last decade;)
If you guys can come up with anything to get me around this I would really
appreciate it. As a side note, do you know if anyone is working on updating
the import features to allow multiple variable imports?
Thanks,
Chris
On Wed, Feb 3, 2010 at 3:51 PM, Allin Cottrell wrote:
>
> On Wed, 3 Feb 2010, Chris wrote:
>
> > That straightens out some things for me.
> >
> http://www.servers.net.in/Servers%20Archive-odbc%20sqlserver%20public%20m...
> > I suspect that is the reason this isn't working. If you have any
> suggestions
> > on how to get around this I would appreciate it.
>
> Ah, that reference is helpful. We'll see if we can find a way to
> work around the bug in question. But I think that has to be in the
> bowels of gretl's ODBC-import code; I don't think there's any way
> to work around it at the level of user input.
>
> Allin Cottrell
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wfu.edu/pipermail/gretl-users/attachments/20100203/09f57ac2/...
------------------------------
Message: 5
Date: Wed, 3 Feb 2010 18:35:17 -0500 (EST)
From: Allin Cottrell
Subject: Re: [Gretl-users] ODBC troubles
To: Gretl list
Message-ID:
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 3 Feb 2010, Chris wrote:
> That's ok. It's about time for a Microsoft product to screw me
> over again; I was just starting to think Microsoft products were
> decent and maybe I was wrong to be a linux user at home for the
> last decade;)
Well, I don't want to start a flamefest here, but I don't see how
one could possibly be wrong to use linux.
> If you guys can come up with anything to get me around this I
> would really appreciate it.
Try the new snapshot at
http://ricardo.ecn.wfu.edu/pub/gretl/gretl_install.exe
or on sourceforge.
> As a side note, do you know if anyone is working on updating the
> import features to allow multiple variable imports?
Nobody's working on that, that I know of. But it's not too hard
to replicate your query string with modification so as to grab as
many variables as you need.
Allin
------------------------------
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
End of Gretl-users Digest, Vol 37, Issue 7
******************************************
[View Less]
14 years, 11 months
ODBC troubles
by Chris
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" @QRY1 --odbc
gives me this error:
gretl version 1.8.7
Current session: 2010-02-02 14:34
? …
[View More]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" @QRY1 --odbc
Error executing script: halting
> data maxbufftemp obs-format-"%d" @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
[View Less]
14 years, 11 months
problem using GJR-garch function package
by Artur T.
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
14 years, 11 months
nice 1.8.7 experience
by Sven Schreiber
Hi,
just want to report that gretl 1.8.7 just did an impressive job in
importing data from an excel sheet. (why impressive? Because monthly
date strings were in an abbreviated German format and the variable names
included long expressions with non-ascii characters. Gretl auto-detected
everything and the import went fine without any user input.)
I also like the new 'variable attribute' dialog feature of browsing
through the variables w/o close-select-open-edit-close... cycle!
thanks for 1.8.7,
sven
14 years, 11 months
scalar in loop condition
by Summers, Peter
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 …
[View More]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 Tech University
===============================
[View Less]
14 years, 11 months