Akaike computation for gretl and R
by Talha Yalta
Why is it that gretl and R return different values for the Akaike and
Schwarz criteria? If it is because of the parameter k setable in R, I
think it would be useful to include in the function reference some
info about gretl's computaiton method. It currently states "Returns
the Akaike Information Criterion for the last estimated model, if
available." This is similar for $bic and $lnl also.
Cheers
Talha
--
“Remember not only to say the right thing in the right place, but far
more difficult still, to leave unsaid the wrong thing at the tempting
moment.” - Benjamin Franklin (1706-1790)
--
14 years, 10 months
MLE Failure in Local Whittle Estimation
by savos schmagges
Hello,
i have tried to re-consturct gretl's calculation code for the local whittle estimation via the mle-command and i am getting very often the failure:
---
Using numerical derivatives
Tolerance = 1.81899e-012
failed to invert OPG matrix GG'
---
Has anyone an idea how i can solve the problem or avoid it? The last value before the failure for d in log-likelihood function is normally ok...but how can i avoid gretl stopping the optimization?
My code is this:
------------
#getting a series y
series e=normal()
series y=fracdiff(e,-1)
#defining bandwith m
scalar m=ceil($nobs^(0.6))
#getting the periodogram
Y={y}
F=fft(Y)
S=sumr(F.^2)
S = S[2:(m)+1]/($nobs/2)
omega=seq(1,(m))'.*(2*pi / $nobs)
#defining starting values
scalar d=-1.0
scalar z=8.0
mle ll = ln((h + r))*(-1)
matrix t=z*(omega).^(-2*d)
matrix lt=ln(t)
matrix iota=ones(m,1)
matrix st=S*transp(t.^(-1))
matrix std=diag(st)
series h = transp(iota)*lt
series r = transp(iota)*std
params d z
end mle
------------
Thank you so much in advance!
Kindest regards
_________________________________________________________________
http://redirect.gimas.net/?n=M1003xHotmail2
Alles in einem Postfach – Ich will Hotmail!
14 years, 10 months
Re: [Gretl-users] Panel Data, print out estimated betas
by Sven Schreiber
Peter Blömeke schrieb:
> Peter Blömeke schrieb:
>> Hi Sven,
>>
>> thx for responding to my obviously misleading question. Am I right that I
>> could explain my question in German to you? If not, please let me know and
> I
>> try it in English again.
>>
>>
>> Ich habe als abhängige Variable die monatlichen Aktienkursrenditen von 612
>> Unternehmen über 180 Monate und als erklärende Variable die Rendite zweier
>> Aktienindizes. Die Daten sind als Paneldaten "Stacked Cross Section"
>> organisiert. Nun möchte ich das Gretl für jedes Unternehmen die beiden
>> Indexrenditen auf die Aktienrendite regressiert und mir jeweils die beiden
>> Koeffizienten ausgibt. Sodass ich schließlich eine Liste mit 612 x 2
>> Koeffizienten habe.
>>
>> Ich hoffe mein Problem ist etwas klarer geworden.
>>
>
> Ok so this is not a panel model at all, but rather 612 times 2 different
> regressions (static but along the time dimension)! (although one could
> use the panel structure of the dataset for the programming)
> And I guess we should understand the term "beta" in the CAPM sense. Then
> indeed you need a loop construct like it was suggested before.
>
> This example indeed uses the panel structure (via $unit -- bugs probably
> included):
>
> scalar numofunits = max($unit)
> matrix betas = {}
> loop for i=1..numofunits
> smpl $unit=i --restrict
> ols stockreturn const indexreturn1 # I made these names up...
> scalar coeff1 = $coeff(indexreturn1)
> ols stockreturn const indexreturn2
> scalar coeff2 = $coeff(indexreturn2)
> matrix betas = betas | {coeff1,coeff2}
> smpl full
> endloop
>
>
> and the 612x2-matrix betas will hold your coefficients
>
> HTH,
> sven
>
>
> Hey Sven,
> thank you so much for taking time to help me. I really appreciate that.
>
> I think we are on the right way now. There are just two Problems left.
>
> First: In fact it should not be 612 times 2 different regressions, but
> rather 612 times one regression with two variables. So it would look roughly
> like this: stockreturn = beta0 + beta1*indexreturn1 + beta2*indexreturn2 +
> errorterm
(please keep the mailing list on cc: -- reply-to-all)
So then use:
ols stockreturn const indexreturn1 indexreturn2
matrix betas = betas | $coeff # or maybe transp($coeff)
-sven
14 years, 10 months
Connection to R - a problem
by Pindar
Hi there,
I've just installed R on my Windows 7 PC and read about the cool
connectivity between the two programs.
GRETL opens R and produced the temp files, alas there is no code written in
R, it's just a new window.
Can someone help me with this problem?
Thanks
Leon
14 years, 10 months
A strange results in the icon view
by yinung@Gmail
Dear Allin and Jack
I have a mydata1.gdt and a script named test.inp as attached. After I
re-run the script, a strange result in the icon view occurs. That is,
there are two model1, model2, model2, ... and so on. If I re-run the
script again. these icons of models will be replicated accumulatively,
though every individual icon works normally if you click on it. (the
screenshot of the icon view is also attached)
Is there anything wrong with my script? Or, is this a minor bug?
Additionally, after that, I am not allowed to delete any variables. An
error says "Cannot delete xxx: variable is in use.
I did several tests but failed to detect the problem. This occurs both
under my win2000 (built date: 2010-01-29) and ubuntu 8.10 (built by
myself, updated with cvs)
Thanks
Yi-Nung Yang
14 years, 11 months
Panel Data, print out estimated betas
by Peter Blömeke
Dear All Gretl User,
I need some help with an regression analysis I am running right now. The
data consists of about 600 entities over 180 month and is organized as panel
data.
Here is my problem:
I want to run a fixed effect panel regression with two independent
(explanatory) variables. Gretl prints out the regression result and gives me
one estimated beta for each variable. However, in a next step I need a
estimated beta for each of the 600 entities in a list to do further
analysis.
My solution so far:
I could run 600 manual regressions and always write down the estimated beta,
but I hope there will be an easier way to handle this.
I would be very grateful for some help.
Kind regards,
Peter
14 years, 11 months
computations with lists and sum()
by Franck Nadaud
Hello Gretl folks, greetings from Paris !
Now returning to GRETL, for (I hope) a while, I have a minor report to submit.
I am currently preparing data for a cross-section demand system estimation
(AIDS or QAIDS stuff) on a large survey file (~10.000 observations). To avoid
clumsy and repetitive (and error prone) action, I decided to use the gretl
variable list concept. However, one I haved defined my list and I want to do
computations, gretl manifested the following minor problem:
When I use the following script:
list ALL = dataset
list NON_DEP = 1 2 237 238 239 240 241 242 243
list DEP = ALL - NON_DEP
nel = nelem(DEP)
series DEPTOT = sum(DEP)
gretl says: argument should be series, is list, but it seems ok on the manual,
chapter 11 on lists and computations.
However, when I try this dirty little trick:
list ALL = dataset
list NON_DEP = 1 2 237 238 239 240 241 242 243
list DEP = ALL - NON_DEP
nel = nelem(DEP)
series DEPTOT = mean(DEP)*235
all runs smooth and well !
Well, it's ok for me, but looks like a minor bug nope ?
cheers
Franck
--
Franck Nadaud
CIRED
UMR 8568 CNRS - EHESS, ENPC, ENGREF, CIRAD
45 bis avenue de la Belle Gabrielle
94736 Nogent-sur-Marne Cedex
TEL: 33-1-43-94-73-94
FAX: 33-1-43-94-73-70
MOB: 06-07-39-92-75
France
14 years, 11 months
Re: [Gretl-users] bug in p-value finder
by Lars Pålsson-Syll
Hi,
I wonder if therE isn't a bug in the latest cvs for the p-value finder. When I put in mean=3, std= 3 and value=4 in the pull-down menu I get the following output:
"Standard normal: area to the right of 4 = 3,16712e-005
(two-tailed value = 6,33425e-005; complement = 0,999937)"
It seems as though the conversion to zscores hasn't been made.
Best regards,
Lars
Lars Palsson Syll
Professor of Civics
Malmo University
Sweden
14 years, 11 months
Command not recognized
by Andreas Noack Jensen
Dear users
So here is my first mail to the list. I am testing different bootstrap
methods in a cointegrated VAR. The main focus is on determining the
cointegration rank under arch effects or SV so my first question is, if it
is possible to modify coint2 so an accessor variable can be used to extract
the test statistic.
Right now I have just programmed the test statistic calculation myself.
However, in the bootstrap loop I get an error saying
command 'beta' not recognized
?
I think my code is okay but it of course always possible that I have missed
something. The weird thing is the following. If I try to assign a zero
matrix to beta in the console I get the this
? beta = zeros(3,3)
Generated matrix beta
? beta
command 'beta' not recognized
?
I am able to assign a scalar value to beta without problems, but I need to
reload the data to use beta again for a matrix.
Any ideas? A bug or where am I failing?
Best
Andreas
--
Andreas Noack Jensen Øster Farimagsgade 5, bygning 26
Ph.d.-stipendiat 1353 København K
Økonomisk Institut Danmark
Københavns Universitet Tel. (+1)646-643-0985
14 years, 11 months
VECM, Impulse response: gretl crashes
by Joachim Smend
Dear Allin, dear Riccardo, dear other contributors to the
development of gretl,
as a newcomer to the gretl user forum first of all I’d like
to say how impressive gretl already is – in its functionality, its
user-friendliness, but also in its flexibility to incorporate other programmes
or own functions through its own scripting language. For an average applied
economist, almost everything is there and easily available – and that as a
result of the efforts of just a few people. Congratulations and thank you very
much – you’ve really succeeded in creating a wonderful programme! I’ve started
using it at version 1.20 or so, and am absolutely amazed at the speed of its
development!
As for SVAR functionality, which would indeed be a great new
item: I’ve seen in a recent posting by Riccardo that there’s already a
collection of scripts available and that one may check how they work out by
oneself. May it be possible to receive these scripts?
And a question on GARCH models: is an addition of other
types of models (such as TGARCH, GARCH-M, where Lee Adkins provides a solution
by using the MLE in his ebook, or EGARCH, PARCH, CGARCH), and possibly an
increase in the possible order of GARCH models planned?
Maybe the latter has already been discussed – if yes, I’m
sorry for bringing it up again!
Thank you very much!
Best,
Joachim
(jsmend(a)hotmail.com)
_________________________________________________________________
http://redirect.gimas.net/?n=M1003xWin7Geschenk2
Hol dir das Gratis-Geschenkpaket von Windows 7 für deinen PC ab!
14 years, 11 months