Panel VAR and Dynamic Panel Regression
by ali gambo
Dear All,
Please forgive my ignorance, but lately I have become a bit confused.
I have a panel data across 19 locations and variables running across these locations for 10 years, and I want to run a vector autoregression in a panel framework.
Most of the literature I read, made reference to using Dynamic Panel regression using the dependent variable with lags, as the same as a PVAR analysis. I know with such a short time series (10 years) it quite tough to get meaningful Var results.
So, does the Dynamic Panel regression (with dependent variable lag) amounts to Panel Var analysis? Kindly advise
Ali.I.Gambo
....Education is our passport to the future, for tomorrow belongs to those who prepare for it.......Malcolm X.
12 years, 6 months
Re: [Gretl-users] Rolling forecasting
by Daniel Bencik
Hello Allin,
The $fcast value is what I have been looking for. Thank you very much! Now I can finish my thesis:) Gretl and this mailing list with you on it are absolutely great.
All the best,
Daniel.
______________________________________________________________
> Od: gretl-users-request(a)lists.wfu.edu
> Komu: <gretl-users(a)lists.wfu.edu>
> Datum: 19.03.2012 17:04
> Předmět: Gretl-users Digest, Vol 62, Issue 15
>
>Send Gretl-users mailing list 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: Rolling forecasting (Allin Cottrell)
> 2. Re: Rolling forecasting (Allin Cottrell)
> 3. picking columns from CSV (Abhijit Gadgil)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Sun, 18 Mar 2012 20:07:44 -0400 (EDT)
>From: Allin Cottrell <cottrell(a)wfu.edu>
>Subject: Re: [Gretl-users] Rolling forecasting
>To: Gretl list <gretl-users(a)lists.wfu.edu>
>Message-ID: <alpine.LFD.2.01.1203181932320.18009@myrtle>
>Content-Type: text/plain; charset="iso-8859-2"
>
>On Sat, 17 Mar 2012, Dan B?so? wrote:
>
>> I am finishing my thesis on volatility prediction and I would like
>> to compare 1-step-ahead forecasts of various models. I tried to
>> use the following code
>>
>> open D:\Thesis\VECM\all_data.gdt
>>
>> smpl full
>>
>> scalar DataLen = $nobs
>> scalar WindowLen = 400
>> scalar FirstObs = 1
>> scalar LastObs = WindowLen
>>
>> matrix Forecasts = zeros( DataLen, 1)
>> matrix StdErrors = zeros( DataLen, 1)
>>
>> matrix FCDest = zeros(DataLen, 1 )
>> matrix ErrDest = zeros(DataLen, 1 )
>> scalar FDestVal= 0
>> scalar EddDestVal= 0
>>
>> loop ForecastPeriod = LastObs + 1..DataLen - 1
>> smpl FirstObs LastObs
>> ols allRR allRR(-1) allRR(-2) allRR(-3) --robust --quiet
>> fcast FDestVal
>> FCDest[$ForecastPeriod,1] = FDestVal
>>
>> FirstObs = FirstObs + 1;
>> LastObs = LastObs + 1;
>> endloop
>>
>> but when trying to save FDestVal after fcasting I receive an error
>> message.
>
>You need to pay attention to the error message, namely
>
> "Matrices not conformable for operation"
>
>In your assignment
>
> FCDest[$ForecastPeriod,1] = FDestVal
>
>you are attempting to assign a series (FDestVal, which gretl is
>willing to convert to a vector on demand) to a single element of a
>vector (FCDest[$ForecastPeriod,1]) and there's no way that can work.
>
>More generally, you need to figure out your logic: How, exactly, do
>you want to make use of the results of the successive forecasts
>generated by the "rolling" estimation-and-forecast loop? Each such
>forecast comprises a series of values, not just a scalar. So what do
>you want to do with these values? Perhaps you need a matrix with a
>number of columns equal to the number of iterations in your loop?
>
>On a relatively small point, you need to lose the trailing ";" on
>some of the script lines -- that's not admissible gretl syntax.
>
>Here's a sample script that does what one might want to do, on one
>interpretation of your objective. That is, it fills out a matrix of
>forecasts using one column per estimated model ("hansl" is gretl's
>scripting language.)
>
><hansl>
>open denmark.gdt
>series allRR = LRM
>
>scalar DataLen = $nobs
>scalar WindowLen = 50
>scalar FirstObs = 1
>scalar LastObs = WindowLen
>matrix FCMat = zeros(DataLen, DataLen - LastObs)
>
>scalar j = 1
>loop t = LastObs + 1..DataLen - 1
> smpl FirstObs LastObs
> ols allRR allRR(-1) allRR(-2) allRR(-3) --robust --quiet
> smpl --full
> fcast FSeries
> FCMat[,j] = FSeries
> FirstObs = FirstObs + 1
> LastObs = LastObs + 1
> j++
>endloop
>
># drop missing values and print
>FCMat = FCMat[4:,]
>print FCMat
></hansl>
>
>Allin Cottrell
>
>------------------------------
>
>Message: 2
>Date: Sun, 18 Mar 2012 20:53:15 -0400 (EDT)
>From: Allin Cottrell <cottrell(a)wfu.edu>
>Subject: Re: [Gretl-users] Rolling forecasting
>To: Gretl list <gretl-users(a)lists.wfu.edu>
>Message-ID: <alpine.LFD.2.01.1203182047270.22065@myrtle>
>Content-Type: text/plain; charset="iso-8859-2"
>
>On Sun, 18 Mar 2012, Allin Cottrell wrote:
>
>> On Sat, 17 Mar 2012, Dan B?so? wrote:
>>
>>> I am finishing my thesis on volatility prediction and I would like to
>>> compare 1-step-ahead forecasts of various models [...]
>
>Here are a couple of other variants of "what you might want" from
>the forecasting exercise and how to achieve the given effects.
>Variable names mostly using the style of Daniel's original script.
>
><hansl>
>open denmark.gdt
>series allRR = LRM
>
># "rolling" 1-step ahead forecast with the sample range
># _augmented_ by one observation at each iteration
>
>ols allRR allRR(-1) allRR(-2) allRR(-3) --robust --quiet
>fcast 1986:3 1987:3 1 rollfcast --rolling
>print rollfcast --byobs
>
># "rolling" 1-step ahead forecast with the sample range
># pushed forward by one observation at each iteration
># (i.e. the last observation is dropped when a new one
># is added)
>
>scalar DataLen = $nobs
>scalar FirstObs = 1
>scalar LastObs = 50
>matrix fcvals = zeros(5,1)
>
>j = 1
>loop t = LastObs + 1..DataLen - 1 --quiet
> smpl FirstObs LastObs
> ols allRR allRR(-1) allRR(-2) allRR(-3) --robust --quiet
> fc1 = LastObs + 1
> fcast fc1 fc1 --quiet
> fcvals[j] = $fcast
> FirstObs++
> LastObs++
> j++
>endloop
>
>printf "\n%12.5f\n", fcvals
></hansl>
>
>Allin Cottrell
>
>------------------------------
>
>Message: 3
>Date: Mon, 19 Mar 2012 12:48:41 +0530
>From: Abhijit Gadgil <gabhijit(a)gmail.com>
>Subject: [Gretl-users] picking columns from CSV
>To: Gretl list <gretl-users(a)lists.wfu.edu>
>Message-ID:
> <CAOFWafjyazuZd3Ury-PYKfg9etXon7HWRi4At0Qx7dQHtdyMyw(a)mail.gmail.com>
>Content-Type: text/plain; charset=UTF-8
>
>Dear All,
>
>I am trying to use the new gretl API from within a C program. What I
>want to do is from a CSV file, pick one or two columns (the file has
>50odd columns). I know the column number. Is there a convenient way of
>doing it rather than providing a list to the dataset_drop_variables()
>which includes everything but the column that I want to pick.
>
>Thanks
>
>-abhijit
>
>
>------------------------------
>
>_______________________________________________
>Gretl-users mailing list
>Gretl-users(a)lists.wfu.edu
>http://lists.wfu.edu/mailman/listinfo/gretl-users
>
>End of Gretl-users Digest, Vol 62, Issue 15
>*******************************************
>
12 years, 6 months
Saving rolling value
by clarodina clarodina
How to save the values from the output on a format for other calculation?
genr a series to save the output for other calculation
Add 10 data and calculating the absolute value of the the adding and roll
forward 1 smpl and recalculating the 10 data
store using matrix? how to use the matrix for further calculation?
12 years, 6 months
picking columns from CSV
by Abhijit Gadgil
Dear All,
I am trying to use the new gretl API from within a C program. What I
want to do is from a CSV file, pick one or two columns (the file has
50odd columns). I know the column number. Is there a convenient way of
doing it rather than providing a list to the dataset_drop_variables()
which includes everything but the column that I want to pick.
Thanks
-abhijit
12 years, 6 months
Rolling forecasting
by Dan Běsoň
Hello everybody,
I am finishing my thesis on volatility prediction and I would like to compare 1-step-ahead forecasts of various models. I tried to use the following code
open D:\Thesis\VECM\all_data.gdt
smpl full
scalar DataLen = $nobs
scalar WindowLen = 400
scalar FirstObs = 1
scalar LastObs = WindowLen
matrix Forecasts = zeros( DataLen, 1)
matrix StdErrors = zeros( DataLen, 1)
matrix FCDest = zeros(DataLen, 1 )
matrix ErrDest = zeros(DataLen, 1 )
scalar FDestVal= 0
scalar EddDestVal= 0
loop ForecastPeriod = LastObs + 1..DataLen - 1
smpl FirstObs LastObs
ols allRR allRR(-1) allRR(-2) allRR(-3) --robust --quiet
fcast FDestVal
FCDest[$ForecastPeriod,1] = FDestVal
FirstObs = FirstObs + 1;
LastObs = LastObs + 1;
endloop
but when trying to save FDestVal after fcasting I receive an error message. I previously tried to write
fcast FCDest[$ForecastPeriod,1]
but that didnt work either. Even though it must be really simple, Im kindof lost, so I will appreciate any hint.
Best regards,
Daniel
12 years, 6 months
rolling template
by clarodina clarodina
is there a template for a rolling data calculation of any command reference
value?
12 years, 6 months
Re: [Gretl-users] Re : A question about graphpage
by Allin Cottrell
On Fri, 16 Mar 2012, oliman wrote:
> Thanks for your answer.
[ On changing the font size in the gretl graph page; the
answer being that you couldn't do it. ]
I've now tried some experimentation with the graph page, and I
see the issue. Unfortunately the meaning of a font size such
as "10" has changed (by a factor of 2, I think) across
versions of gnuplot's "pdfcairo" driver, which is the
preferred means of generating the graph page as PDF. This
means that the font can turn out too small or too big dpending
on the gnuplot version. Urgh.
To work around this I've added a new sub-command to the
"graphpg" command. You can now say, for example:
graphpg fontscale 2.0
to double the font size relative to the default. Do this in a
script or at the gretl console. The setting will be remembered
for the duration of the gretl session.
On my TODO list is figuring out exactly when the pdfcairo font
size interpretation changed, so that by inspecting the gnuplot
version/date gretl can maybe get it right automatically.
Allin Cottrell
12 years, 6 months
How to compile Gretl for Cygwin
by Chloe
1.. Install all the dependencies with setup.exe, except install GTK3. Also install xinit for X11 Server.
2.. Restart the shell because LAPACK requires things set in the environment and are only picked up upon login.
3.. Download & install gtksourceview manually because there is no Cygwin module for that. http://ftp.acc.umu.se/pub/gnome/sources/gtksourceview/3.3/gtksourceview-3...
1.. wget <link>
2.. xzcat gtksourceview-3.3.4.tar.xz | tar -xvf -
3.. cd gtksourceview-3.3.4
4.. configure
5.. make
6.. make install
7.. Set PKG_CONFIG_PATH because gtksourceview installs into a different location.
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
4.. Download gretl
wget http://prdownloads.sourceforge.net/gretl/gretl-1.9.7.tar.bz2
5.. bzcat gretl-1.9.7.tar.bz2 | tar -xvf -
6.. cd gretl-1.9.7
7.. Set a special flag for Cygwin because the configure script doesn't work
export LDFLAGS=-no-undefined
8.. Run configure with special options, again because the configure script doesn't work
configure --enable-static --enable-shared --enable-gtk3
9.. If you have an older computer without SSE2 instructions, then edit all the Makefiles with SSE2 option and comment them out. Once again the configure script is broken.
find . -name Makefile | xargs grep -i sse2
10.. Now run 'make' and 'make install'.
11.. Set your display to run X programs
export DISPLAY=:0.0
12.. Run 'gretl'.
12 years, 6 months
A question about graphpage
by oliman
Hello all,
This is my first post to this list… Thanks for reading.
I would like to know if it is possible to change the font size in graphpage. When I insert graphs, letters are rather little and they remain even if I modify the font size in the graph (before insert it in graph page).
Any help would be greatly appreciated.
12 years, 6 months
Sample size and ADF test in gretl and R
by Grzegorz Konat
Hello,
I have a minor question concerning how sample size affects ADF unit root
test results in gretl and other econometric software.
Let me give you an example:
I have a series of T=51, for which ADF test results are all the same in
gretl, R (urca) and JMulTi. Yet when I use a subsample of T=20 (last
twenty observations), test statistics obtained with gretl are
significantly different from those of R and JMulTi (both the latter,
however, produce the same output). Of course, I use the same
deterministic term option and lag lenght for those comparisons.
Is there any particular reason for that situation? Or is it me doing
something wrong?
(I attach data file for those, who'd like to replicate my issue)
Best,
Greg
12 years, 6 months