removing nan and inf from a matrix
by Logan Kelly

Hello,
I need to take the log difference of a matrix, i.e. log(M[2 rows(M):,]/M[1:rows(M)-1,]). Unfortunately, M has elements equal to zero. I need to replace the nan's and inf's with 0's. This almost works
M = isnan(M) ? 0 : M
but does not remove inf's. Any sugestions?
3 years, 8 months

bivariate probit in a loop
by Artur Bala

Dear all,
I'm currently estimating a bootstraped bivariate probit through a
progressive loop and retrieve each time the $yhat matrix. At some point,
the execution is interrupted with the "warning":
The statistic you requested is not available
>> genr series predict_external = $yhat[,1]
Is there a perfect prediction symptom behind this message isn't it?
Can one, in such a loop, skip cases where the MLE estimation is not
technically possible?
Best,
Artur
5 years

problems with daily data
by Sven Schreiber

Hi,
I have a csv file with daily data, where each calendar day is a row, but
it's actually 5-days-a-week data, i.e. weekend days do not contain data.
First I have a problem with the import, gretl only imports it as undated
because it says about the date labels:
"
erster Zeilenkopf "99-01-04", letzter Kopf "2014-05-19"
Behandlung als undatierte Daten
"
(=treating it as undated), but the reason given is not true, because the
first date string is actually:
"1999-01-04"
so there seems to be some problem with the date parsing.
Ok, I can work around that, defining it manually as 7-days-daily data
with the right starting date. Then I have the interface issue that at
the bottom it only says "daily" (in German), but I think it is important
here to show the distinction between 5- or 6- or 7-days-daily.
Next I would like to convert the workfile from 7-days-daily to
5-days-daily, i.e. remove the empty (=missings) weekends obs, but this
doesn't seem to be easy to do. (Note that removing all missing obs is
not equivalent, because that also eliminates other holidays, which is
another topic. Also I know I could use 'join' together with the source
csv file to do that, but I think it should be easier than that, no?)
When I try to work around that by removing all missing obs (including
the holidays) within the 7-days-daily workfile, I run into the old
problem that gretl then starts treating it as undated and the date
information is lost. Note that I cannot then manually set it to
5-days-daily because of the missing holidays which gretl doesn't know
about, i.e. the imposed dating produces errors, and this accumulates
over time.
The first thing mentioned is a bug, but any ideas about the other stuff?
Thanks,
sven
5 years, 5 months

Regressing a Quadratic equation
by Chi B. Fule

Hi there,
please may I receive assistance on how to regress a quadratic equation using cross-sectional data?
Thanks in advance
Chi
5 years, 6 months

"sprintf" as a function
by Henrique Andrade

Dear Gretl Team,
I'm trying to use the sprintf as a function instead of a command and it is not working here at my Windows Vista withe the latest Gretl snapshot.
Please take a look at the following script:
<hansl>
open australia.gdt
genr time
ols PAU const time
matrix T = $coeff./$stderr
scalar T_calc = abs(T[2,])
scalar T_tab = critical(t, $T, 0.05)
sprintf Test_1 "t-calculado: %f \n t-tabelado: %f", T_calc, T_tab
print "@Test_1"
string Test_2 = sprintf("t-calculado: %f \n t-tabelado: %f", T_calc, T_tab)
print "@Test_2"
</hansl>
Best regards,
Henrique
Enviado desde mi iPhone
5 years, 6 months

gnuplot shaded areas
by Artur T.

Hi all,
I trying to plot a matrix where the last two columns contain information on
confidence intervals which I would like to plot as a shaded area.
I wrote a script, but the pdf is not properly compiled giving me an error
msg which I don't fully understand. I attached a script which requires the
matrix to plot and the path where to store the pdf as inputs.
Unfortunately I can't figure out where the error is.
Thanks for your help in advance.
Best,
Artur
5 years, 6 months

Re: [Gretl-users] Skewness and Excess Kurtosis formulas in Gretl
by Alecos Papadopoulos

For what is worth, I was able to determine through numerical
experiments, that Gretl uses the "Fisher-Pearson" formulas for
calculating the skewness and excess kurtosis coefficients.
This essentially means that for the calculation of these coefficients,
all sample means involved (/even/ the sample variance/standard
deviation) are calculated using the factor (1/n), and that no
bias-correction terms appear.
I am writing this informatively - I have no settled opinion on which
alternative formula should be preferred.
So
*Skewness* Coefficient (this version is usually denoted "g1")
Numerator: (1/n)(?(x_i - mean(X))^3)
Denominator : [(1/n)?(x_i - mean(X))^2]^(3/2)
*(Excess) Kurtosis *Coefficient (this version is usually denoted "g2")
Numerator : (1/n)(?(x_i - mean(X))^4)
Denominator : [(1/n)?[x_i - mean(X)]^2]^2
and we further subtract "3" after we calculate the ratio to obtain the
"excess" over the kurtosis of the normal distribution.
References for the names and presentations of various alternatives
Joanes, D. N., & Gill, C. A. (1998). Comparing measures of sample
skewness and kurtosis. /Journal of the Royal Statistical Society: Series
D (The Statistician)/, /47/(1), 183-189.
Doane, D. P., & Seward, L. E. (2011). Measuring skewness: a forgotten
statistic. /Journal of Statistics Education/, /19/(2), 1-18.
Alecos Papadopoulos
Athens University of Economics and Business, Greece
Department of Economics
cell:+30-6945-378680
fax: +30-210-8259763
skype:alecos.papadopoulos
On 7/8/2014 19:00, gretl-users-request(a)lists.wfu.edu wrote:
> Yes. I might just add that our measures are in agreement with those of the
> "moments" package for R, except that R gives total rather than excess
> kurtosis.
>
> Allin Cottrell
5 years, 6 months

Re: [Gretl-users] Expression for sample excess kurtosis and sample skewness calculation in Gretl
by Alecos Papadopoulos

Good afternoon.
Is it possible to provide the exact expressions for the calculation of
sample excess kurtosis, and for sample skewness, that Gretl uses? I
wasn't able to find them in the User Guide or in the Help menu, and
there are varying expressions available in the literature, with
different bias-correction terms.
Thank you.
PS : The swinging MLE appears to work fine.
--
Alecos Papadopoulos
Athens University of Economics and Business, Greece
Department of Economics
cell:+30-6945-378680
fax: +30-210-8259763
skype:alecos.papadopoulos
5 years, 6 months