changing panel data structure
by Summers, Peter
Allin,
While helping a student sort out a dynamic panel estimation, I discovered the following. If I take a data set that's organized as stacked time series, change the structure to stacked cross-sections, then change it back, the second change isn't implemented. I get a box saying no changes were made. Is this intended behavior?
Also, I have a clarification question: if I estimate a dynamic panel model with y as the dependent variable, the output lists "Dy(-1)" as the first x variable. At first I thought that meant the lagged first difference, but reading the dpanel documentation it seems like this is actually y(-1). It's the lagged level, right?
TIA,
PS
===============================
Dr. Peter Summers
Assistant Professor
Department of Economics
Texas Tech University
===============================
13 years, 8 months
CVS back up!
by Allin Cottrell
For anyone used to accessing gretl CVS -- after an outage of
almost 2 weeks, sourceforge CVS is now back online.
Allin Cottrell
13 years, 8 months
Re: [Gretl-users] Script Editor: Very Strange Behavior
by Allin Cottrell
On Mon, 7 Feb 2011, Henrique Andrade wrote:
> Recently I've noted a very strange behavior inside the command
> script editor (under Windows Vista): when I select some lines
> they simply disappear and when I move the command prompt the
> lines come back...
Can you try the current snapshot on sourceforge and see if the
problem persists?
On January 18 I changed some of the GTK-related runtime files
included in the Windows package, and some of these may have been
bad or mismatched in some way. I've now updated to the latest
win32 builds from gnome.org.
Allin Cottrell
13 years, 8 months
Re: [Gretl-users] Script Editor: Very Strange Behavior
by Allin Cottrell
On Tue, 8 Feb 2011, Summers, Peter wrote:
> I get behavior similar to Henrique's on XP, and not just in the
> script editor. There, if I select a few lines, the lines below
> it disappear unless/until I extend the selection downward.
> Nothing's actually deleted - if I click on the script window
> everything reappears.
OK, thanks for the reports; I'll look into this.
Allin Cottrell
13 years, 8 months
Script Editor: Very Strange Behavior
by Henrique Andrade
Dear Gretl Community,
Recently I've noted a very strange behavior inside the command script editor
(under Windows Vista): when I select some lines they simply disappear and
when I move the command prompt the lines come back. I think this is somewhat
hard to describe, so if you want I can send a short video with the problem.
Best,
--
*Henrique C. de Andrade*
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
13 years, 8 months
MacKinnon, Haug, and Michelis (1999) critical values
by Leon Unger
Hi there,
I've got a question concering the MacKinnon, Haug, and Michelis (1999)
critical values in VECMs.
At University I (have to) work with EViews and after performing a
Johansen Cointergrating Test including an I(0) exogenous variable.
However, I wonder whether the test is biased towards finding a CI vector
when including this variable. Hence I looked up in the object reference
and found:
"Note that the output for cointegration tests displays p-values for the
rank test statistics.These p-values are computed using the response
surface coefficients as estimated in MacKinnon, Haug, and Michelis
(1999). The 0.05 critical values are also based on the response surface
coefficients from MacKinnon-Haug-Michelis. Note: the reported critical
values assume no exogenous variables other than an intercept and trend."
Does anyone know, whether there exist critical values including an I(0)
variable different from an intercept and trend?!
Best
Pindar
13 years, 8 months
Re: [Gretl-users] import data via odbc
by Allin Cottrell
On Thu, 3 Feb 2011, Leon Unger wrote:
> Am 31.01.2011 21:43, schrieb Allin Cottrell:
> > string Q = "SELECT country,year,y FROM FooBase"
> > data y obs-format="%s:%d" query=Q --odbc
> >
> > This should work if the "country" variable contains string
> > country-codes such as "FRA", "GER", etc., and the year variable
> > contains years as integers:
> >
> > GER:1990 123.5
> > GER:1991 127.6
> >
> > This assumes that the pre-existing gretl dataset has observation
> > strings on the pattern shown above.
>
> I created an empty panel dataset with appropriate obs:time
> combinations and then used the GUI to read in the oberservation
> markers from a txt file. I know how to create the 'normal' empty
> panel via script, but how can I get the markers directly from
> script?
Well, you could do something like this:
<script>
scalar N = 3
scalar T = 10
scalar yr0 = 1990
string s1 = "FRA"
string s2 = "GER"
string s3 = "GBR"
set echo off
outfile markers.txt --write
loop i=1..N --quiet
loop j=1..T --quiet
printf "%s:%d\n", s$i, yr0+j-1
endloop
endloop
outfile --close
</script>
That will give you a file containing the observation markers. You
can add these to a dataset using the GUI ( /Data/Observation
markers ), or, if you use the latest snapshot from
http://gretl.sourceforge.net/win32/ , you can add the markers
via script using a new option to "setobs", as in
<script continues>
scalar NT = N*T
nulldata NT --preserve
setobs T 1:01 --stacked-time-series
setobs --labels=markers.txt
</script>
Allin Cottrell
13 years, 8 months
Re: [Gretl-users] Block-of-blocks bootstrap
by Allin Cottrell
On Fri, 4 Feb 2011, Giuseppe Vittucci wrote:
> I made all the code for the bootstrap and used the command "nulldata
> #obs --preserve" to clear the dataset and create new series from the
> matrices.
> But unfortunately when the nulldata command is used in a loop the
> program returns the following error:
> "Sorry, this command is not available in loop mode"...
> What command can I use which does not create problems in loops?
You just have to move the nulldata command outside of the loop.
1) Load data into matrix X0 for resampling, create matrix X1
with N rows to hold resampled values
2) nulldata N --preserve
3) loop: refill random vector and put selected blocks
from X0 into X1; and if you need the values as series,
copy them out from the columns of X1
Allin Cottrell
13 years, 8 months
Re: [Gretl-users] Block-of-blocks bootstrap
by Allin Cottrell
On Tue, 1 Feb 2011, Giuseppe Vittucci wrote:
> Is there a simple way to do block PAIRS bootstrap?
Create a matrix, X0, holding the data pairs, and an appropriately
sized matrix, X1, for the result.
matrix X0 = {your_list}
matrix X1 = zeros(T, cols(X0))
Create a random vector, R, to pick the starting indices of the
blocks to be selected (you can use the muniform() function,
suitably scaled).
Loop across the elements of R, picking the selected row-blocks
from X0 and inserting them progressively into X1.
row = 1
loop i=1..n
r = R[i]
matrix tmp = X0[r:r+b-1,]
X1[row:row+b-1,] = tmp
row += b
endloop
If you want the columns of X1 as series, then use "nulldata" with
a suitable number of observations plus the --preserve option, and
do
series y = X1[,1]
series x = X1[,2]
or similar. Use "setobs" if you want to impose a time series
interpretation on the resampled data.
Allin Cottrell
13 years, 8 months
command to access bootstrapped confidence intervals for OLS
by Artur Tarassow
Hi,
I am wondered whether there is a simple command or option to compute
bootstrapped confidence intervals for models using OLS? Something like
one can find via the menu after estimation: Analysis --> bootstrap...-->
etc.
Of course one could write a program, but maybe this is already possible
but not documented, yet.
Thanks,
Artur
13 years, 8 months