gretl
by Carla Fernandes
Hello
My name is Carla and use gretl recently. So, I would like
to know if it is possible estimate a equations system
with the method SUR (for time series) with the option of
robust errors and what is the scipt for this function.
Grateful for the attention.
Regards.
___________________________________________________________
Carla Fernandes
Prof. Adjunta Convidada
Universidade de Aveiro - ISCA
Apartado 58
3811-953 Aveiro
Portugal
Telefone: + 351 234 380 110 / Fax: + 351 234 380 111
e-mail: carla.fernandes(a)ua.pt
14 years, 10 months
Gretl
by Carla Fernandes
Hello
My name is Carla and use gretl recently. So, I would like
to know if it is possible estimate a equations system
with the method SUR (for time series) with the option of
robust errors and what is the scipt for this function.
Grateful for the attention.
Regards.
___________________________________________________________
Carla Fernandes
Prof. Adjunta Convidada
Universidade de Aveiro - ISCA
Apartado 58
3811-953 Aveiro
Portugal
Telefone: + 351 234 380 110 / Fax: + 351 234 380 111
e-mail: carla.fernandes(a)ua.pt
14 years, 10 months
Saving results as LaTeX files
by Data Analytics Corp.
Hi,
A great feature of Gretl is the ability to save model results as LaTeX
.tex files. But it seems that this is only possible when the menus are
used to develop a model. How can I do this when I use a script?
Thanks,
Walt
--
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
walt(a)dataanalyticscorp.com
www.dataanalyticscorp.com
14 years, 10 months
Klein I model
by Fritsche, Ulrich
Folks,
does someone use the Klein I model as an example in the classroom?
I tried to re-estimate the results from expl. 15.2. from Green (5th edition), ch. 15. I used Allin's script from 2004 (Gretl-users list archive) and added "genr K1 = K(-1)" .
open klein.gdt
genr W = Wp + Wg
genr A = t - 1931
genr P1 = P(-1)
genr X1 = X(-1)
genr K1 = K(-1)
# Equation-by-equation OLS
ols C 0 P P1 W
ols I 0 P P1 K1
ols Wp 0 X X1 A
# Equation-by-equation TSLS
tsls C 0 P P1 W ; 0 G T A Wg P1 K1 X1
tsls I 0 P P1 K1 ; 0 G T A Wg P1 K1 X1
tsls Wp 0 X X1 A ; 0 G T A Wg P1 K1 X1
# Now set the model up as a system
system name="Klein Model 1"
equation C 0 P P1 W
equation I 0 P P1 K1
equation Wp 0 X X1 A
identity P = X - T - Wp
identity W = Wp + Wg
identity X = C + I + G
endog C I Wp P W X
end system
# and estimate it in various ways
estimate "Klein Model 1" method=3sls
estimate "Klein Model 1" method=fiml
estimate "Klein Model 1" method=liml
The results are fine (in line with the results reported in Greene (2002) with the exception of the result for the constant in the third (wage) equation. I wonder if someone has the same result.
I attach the results as well (*.doc)
Cheers, Ulrich
Professor Dr. Ulrich Fritsche
Fachbereich Sozialökonomie
Fakultät Wirtschafts- und Sozialwissenschaften
Universität Hamburg
Von-Melle-Park 9
20146 Hamburg
www.ulrich-fritsche.net
14 years, 10 months
VAR: Saving responses via script
by Henrique Andrade
Dear users,
I have a trivariate VAR (v1, v2, v3) and I would like to save responses of
"v1" to a one-standard error shock in the "v2".
Using the GUI, after estimating a VAR, I can select Analysis -> Impulse
responses and then save the results as a .txt file and edit this file to
obtain what I want.
How can I do this using a script?
Best,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
14 years, 10 months
How to insert variable labels?
by Allin Cottrell
Henrique wrote:
> In a time series context, how may I insert variable labels (from a .txt
> file) into a dataset via a script or console? I know that using the GUI I
> can choose "Data -> Variable labels" and then select the .txt file with the
> descriptions.
A couple of recent tweaks in CVS (to the sscanf function and the setinfo
command) make this a bit easier than before. Example follows, where we
assume that labels.txt contains one variable label per line, for each
of the substantive variables in the dataset.
<script>
nulldata 10
series x1 = normal()
series x2 = normal()
series x3 = normal()
series x4 = normal()
string labeltext = readfile("labels.txt")
string vname, label
loop i=2..5 -q
sscanf(labeltext, "%63[^\n]", label)
setinfo i -d "@label"
labeltext = labeltext + strlen(label) + 1
endloop
</script>
(BTW, apologies for not replying "properly"; my university email account
is screwed up at the moment so I'm resorting to gmail.)
--
Allin Cottrell
Department of Economics
Wake Forest University
14 years, 10 months
VAR Lag Selection Error
by Henrique Andrade
Dear Developers,
I'm estimating a VAR model and I'm getting a strange Gretl behaviour. When I
try to choose the optimal VAR lag using the GUI (Model -> Time series ->
VAR lag selection) Gretl crashes (I attached the Mac OS X Crash Report). The
same problem doesn't occur when I do the same thing using a script. My
script is something like this:
<scrip>
open monthly_data.gdt
ldiff v1 v2 v3
var 24 ld_v1 ld_v2 ld_v3 --lagselect
</script>
I'm using Gretl for Mac (build date 2010-03-23).
Best regards,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
14 years, 10 months
How to insert variable labels?
by Henrique Andrade
Dear Gretl Community,
In a time series context, how may I insert variable labels (from a .txt
file) into a dataset via a script or console? I know that using the GUI I
can choose "Data -> Variable labels" and then select the .txt file with the
descriptions.
Best,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
14 years, 10 months
About "setinfo" within a user defined function
by yinung@Gmail
Dear all,
I found a possible (though minor) bug about setinfo within a user
defined function. Once a variable was generated in a user's function
with a description set by common "setinfo," the "setinfo" command will
not work since the description of the corresponding variable will not
be CORRECTLY replaced.
See for example in the following script, the description of z is
always "myVariable=2" no matter what param is given.
Thanks
Yi-Nung
<script>
function list myf(series y,scalar param)
sprintf sInfo "%s ver= %d",argname(y),1
series z=y*10
setinfo z -d @sInfo
sprintf sInfo "%s=%d",argname(y),param
series z=y*10
setinfo z -d @sInfo
list retlist=z
return retlist
end function
nulldata 10
setobs 1 1 --time-series
series myVariable=normal()
list mylist=myf(myVariable,2)
list mylist=myf(myVariable,1)
</script>
14 years, 10 months