Quotation marks (" ") and string manipulation
by Henrique Andrade
Dear Gretl Community,
How can I use quotation marks inside a Gretl function that deals with
strings? Suppose a I have a text file like this one:
<text file>
O meu nome é "Severino",
como não tenho outro de pia.
Como há muitos "Severinos",
que é santo de romaria,
deram então de me chamar
"Severino de Maria".
<text file>
Now I would like to use readfile and strsub functions to read the file and
replace the quotation marks (" ") with asterisks (* *):
<hansl>
string Texto = readfile("Morte e Vida SeverinaSeverino.txt")
strinf Novo_Texto = strsub(Texto, """, "*")
<hansl>
Best regards,
Henrique
9 years, 8 months
Quick (and urgent) help with script...has it changed?
by Paulo Grahl
Hello,
I have the following piece of code in my script:
loop t=(jsample+2)..tend
loop foreach i ylist
$i[t]=$ihat[t]
endloop
endloop
where jsample and tend are scalars and ylist is a list with a few time
series, say "hires" and "quits".
I had generated hireshat and quitshat with the forecasts for the end of the
sample. The idea of the loop is to included the forecasts into the original
time series "hires" and "quits".
It all worked fine when I last run the code (about 3 months ago). Now, I
get an error message saying that
$i[t] = $ihat[t] is a syntax error.
Has anything changed in how the script understands $i[t] ??
Thanks!
Paulo
9 years, 8 months
Help - estimation of Profile likelihood function for TVECM
by Miranda Svanidze
Hello,
I am new here.
My problem is following: I want to calculate entire profile likelihood
function (and then find maximum value) in order to find threshold estimate
and run TVECM model. Therefore I want to build script (with loop
programming) which will calculate just entire profile likelihood function
in Gretl. The other estimations I can perform myself.
Here is my request formulated below:
# Model: TVECM (Threshold Vector Error Correction Model)
# Name of my variables: dependent variable - Y (Price on market
1); independent variables - X (Price on market 2) and ECT (Error correction
term)
# My data sample runs from 2006:10 to 2014:08
# First, I need to generate variables "difference of Y", "difference of X",
"Lagged value of ECT", "lagged value of diff_Y", and "lagged value of
diff_X"
# "Lagged value of ECT" is my threshold variable - Threshold value must
come from it.
# My final target is to *calculate the entire profile likelihood function
of ols regression and save results in a separate file* (let's say "LF.gdt")
# Below is my guess how the process must be solved. Could you adjust it to
my data and help me to complete?
------------script----------------
loop i=2006:10..2014:08 --progressive --quiet
genr
ols
genr LF = $lnl
store "C:\.....\.....\......\LF.gdt" LF
endloop
Thank you!
Kind regards,
Miranda
9 years, 8 months
Building only gretlcli
by Sven Schreiber
Hi,
I would like to build the current development version on a Linux server
where I will/can only use the command-line (CLI) version of gretl
without any GUI. Are there any instructions about configure switches or
similar on how to build this CLI subset of gretl? I couldn't find
anything apart from the standard "full-build" instructions (but I
haven't looked very thoroughly).
I do not have root access on that server, and I'm not sure if a standard
full build of gretl (including the GUI version) would succeed due to the
build dependencies, but maybe it would. However my preference would be
to only build what's really necessary.
thanks,
sven
9 years, 8 months
Help - estimation of Profile likelihood function for TVECM
by Miranda Svanidze
Hello,
I am new here.
My problem is following: I want to calculate entire profile likelihood
function (and then find maximum value) in order to find threshold estimate
and run TVECM model. Therefore I want to build script (with loop
programming) which will calculate just entire profile likelihood function
in Gretl. The other estimations I can perform myself.
To provide you with detailed information about my problem I attach separate
file “TVECM.inp” in this email. Inside you will find all necessary
information.
Thank you!
Kind regards,
Miranda
9 years, 8 months
ODBC dsn=.... error
by Les Snyder
I recently upgraded to the latest Gretl release to take advantage of the
join functionality for .gdt tables. Unfortunately now my "Open dsn="
statements produce an error. The statements worked previously - and when I
reinstall the previous version of Gretl - they still work. However, when I
install the latest release from April 2015 the statement produces the error.
The statement producing the error is: "open dsn=GretlPort --odbc #This is
the (Gretl Port Engine.accdb)
The error produced is: "You must specify a DSN using 'dsn=...'"
I have reviewed all of the documentation and any relevant information from
the users list. Any assistance with this issue would be gratefully
appreciated.
Thank You in advance.
9 years, 8 months
Re: [Gretl-users] Breusch-Pagan test for Heteroskedasticity (Gretl-users Digest, Vol 100, Issue 3)
by Alecos Papadopoulos
Graham,
I verified using your data set that Gretl calculates correctly the
Breusch-Pagan LM test for heteroskedasticity, *as described in the
original paper,**
*
A Simple Test for Heteroscedasticity and Random Coefficient Variation
Author(s): T. S. Breusch and A. R. Pagan
Source: Econometrica, Vol. 47, No. 5 (Sep., 1979), pp. 1287-1294
Published by: The Econometric Society
Stable URL: http://www.jstor.org/stable/1911963
The auxiliary regression is performed using the *scaled* squared
residuals as Dependent variable (as indicated in the Gretl's output),
and the statistic is 0.5*R^2*(Total Sum of Squares of the Dependent
Variable), the R^2 from this auxiliary regression, where I used the
exact same regression matrix of the main regression (constant + the
three regressors)
The scaling of the squared residual series is by the maximum likelihood
estimator for the variance from the original model, ie. sum of squared
residuals divided by nobs (not nobs-1).
Maddala's Econometrics textbook (2001, 3d ed. pp 205-207) explains the
relation of the above statistic with the approach you implemented
(correctly) by hand, which is the "usual" way to obtain an LM statistic.
But these are only asymptotically equivalent, and in practice the
estimated sigma^4 is involved, whose estimation is seriously biased in
any case for samples much larger than yours.
So I do not think there is any bug or computational mistake involved,
just an (educative) case of asymptotic equivalence not materializing at
finite-sample level.
Personally I would go with the original Breusch-Pagan test statistic.
Alecos Papadopoulos
Athens University of Economics and Business, Greece
Department of Economics
cell:+30-6945-378680
fax: +30-210-8259763
skype:alecos.papadopoulos
On 4/5/2015 16:31, gretl-users-request(a)lists.wfu.edu wrote:
> Message: 1
> Date: Mon, 04 May 2015 11:07:53 +0100
> From: Graham Stark<graham.stark(a)virtual-worlds.biz>
> To:gretl-users@lists.wfu.edu
> Subject: [Gretl-users] Pagan Heteroskedasticity Test
> Message-ID:<1430734073.12002.6.camel(a)virtual-worlds.biz>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> I'm puzzled by the output of the Breusch-Pagan Heterokskedasticity test
>
> The example here:
>
> http://virtual-worlds-research.com/ou/econometrics/hetero_test.zip
>
> shows me attempting to replicate Gretl's Breusch-Pagan and White tests
> on a simple teaching dataset. The White Test is identical but the Pagan
> test is very different from how I always thought you did it. Apologies
> if I've misunderstood what you're doing.
>
> This is the packaged Gretl 1.9.91 from Debian Linux, but I'm pretty
> certain you get the same result on the latest Windows version (it was a
> student running Windows that asked me about this). As yet I haven't
> tried the latest Sourceforge versions, I'm afraid.
>
> While I'm here, I'd just like to thank everyone involved with this
> project for all their good work. I teach with Gretl at the UK Open
> University, several hundred students per year, and it's been a boon to
> us.
>
> regards,
>
> Graham
>
>
> -- Graham Stark, Virtual Worlds Research
> http://www.virtual-worlds-research.com 136 Hainault Avenue, Milton
> Keynes, MK14 5PG, UK t: (+044) 01908 618239 skype: graham_k_stark
> m:(+044)07763309602 -------------- next part -------------- A non-text
> attachment was scrubbed... Name: signature.asc Type:
> application/pgp-signature Size: 473 bytes Desc: This is a digitally
> signed message part URL:
> <http://lists.wfu.edu/pipermail/gretl-users/attachments/20150504/41b53f33/...>
9 years, 8 months
Interrupted time series
by Michael Ott
To clarify my initial question regarding performing an interrupted time series analysis, I'm looking at time series data before during and after an intervention to see if the intervention resulted in a change to the data. Based on visual inspection of the time series plot there is a large change in the level and a trend change through out the time series. I'm attempting to do something like what is described in the following reference:Elligsen, M., Walker, S. A. N., Pinto, R. Infect Control Hospital Epidemiol 2012;33(4):354-361
Thank you for your assistance
Michael Ott
Sent from my iPhone
9 years, 8 months
Pagan Heteroskedasticity Test
by Graham Stark
Hi,
I'm puzzled by the output of the Breusch-Pagan Heterokskedasticity test
The example here:
http://virtual-worlds-research.com/ou/econometrics/hetero_test.zip
shows me attempting to replicate Gretl's Breusch-Pagan and White tests
on a simple teaching dataset. The White Test is identical but the Pagan
test is very different from how I always thought you did it. Apologies
if I've misunderstood what you're doing.
This is the packaged Gretl 1.9.91 from Debian Linux, but I'm pretty
certain you get the same result on the latest Windows version (it was a
student running Windows that asked me about this). As yet I haven't
tried the latest Sourceforge versions, I'm afraid.
While I'm here, I'd just like to thank everyone involved with this
project for all their good work. I teach with Gretl at the UK Open
University, several hundred students per year, and it's been a boon to
us.
regards,
Graham
--
Graham Stark, Virtual Worlds Research
http://www.virtual-worlds-research.com
136 Hainault Avenue, Milton Keynes, MK14 5PG, UK
t: (+044) 01908 618239 skype: graham_k_stark m:(+044)07763309602
9 years, 8 months