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?
4 years, 3 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, 8 months

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
6 years

Re: [Gretl-users] Mean compare
by Allin Cottrell

On Fri, 30 May 2014, Frank Benford wrote:
> I have a question about gretl's procedure here. Why is the p-value
> calculated "in relation to the normal distribution"? Shouldn't it be
> calculated in relation to a t random variable with number of degrees of
> freedom computed by the Smith-Satterthwaite formula? Of course, if n1 and
> n2 are even moderately large, this refinement makes no difference as the t
> random variable is effectively a standard normal random variable. Could
> this be the explanation for why R and gretl return different p-values in
> Rosen Iliev's case?
Probably it is the reason for the difference from R. Up till now
we've used the asymptotic test (with a warning if the sample sizes
are too small). It doesn't cost much to use the Satterthwaite
approximation to the t distribution, so maybe we'll do that. Within
reason, anything that cuts down on "Why do your results differ from
program P?" is good.
Allin Cottrell
> -----Original Message-----
> From: gretl-users-bounces(a)lists.wfu.edu
> [mailto:gretl-users-bounces@lists.wfu.edu] On Behalf Of Allin Cottrell
> Sent: Friday, May 30, 2014 12:54 PM
> To: Gretl list
> Subject: Re: [Gretl-users] Mean compare
>
> On Fri, 30 May 2014, Rosen Iliev wrote:
>
>> Hi,
>> first sorry for the stupid question. I am performing datamining with R
>> from one year and recently found Gretl program. It is wonderful for
>> fast descriptive analysis, mean compare and graphics for novices! Can
>> You tell me what type analysis is calculated from "statistic
>> calculator" when checkbox "assume common population standard
>> population" is not tick? The reason for asking is different "p"
>> results, compared to R, when there is no thick.
>
> If a common variance is not assumed we use the asymptotic standard error of
> the difference in means, namely
>
> sqrt(vm1 + vm2)
>
> where vm1 = [(variance of variable 1) / n1] and similarly for vm2.
> We then find the p-value for the difference divided by its standard error in
> relation to the normal distribution.
>
> Allin Cottrell
6 years, 4 months

Mean compare
by Rosen Iliev

Hi,
first sorry for the stupid question. I am performing datamining with R from
one year and recently found Gretl program. It is wonderful for fast
descriptive analysis, mean compare and graphics for novices! Can You tell
me what type analysis is calculated from "statistic calculator" when
checkbox "assume common population standard population" is not tick? The
reason for asking is different "p" results, compared to R, when there is no
thick.
Thank You in advice for fast answer.
dr Iliev
6 years, 4 months

Bootstrap coefficient - SUR
by Carla Fernandes

Hello,
Someone could tell me is it is possible to bootstrap the coefficient "b" of a system equations SUR?
Thank you very much.
Best regards,
Carla Fernandes.
___________________________________________
Carla Fernandes
Diretora da Licenciatura em Finanças
Universidade de Aveiro
Instituto Superior de Contabilidade e Administração
R. Associação Humanitária dos Bombeiros de Aveiro
3810-500 Aveiro
Portugal
Telefone: + 351 234 380 110 / Fax: + 351 234 380 111
e-mail: carla.fernandes(a)ua.pt<mailto:carla.fernandes@ua.pt>
6 years, 4 months

Lists and foreach-loops
by Henrique Andrade

Dear Gretl users,
I'm a little bit confused about the use of lists with foreach-loops. Please take a look at the following code:
<hansl>
open australia.gdt
list L1 = PAU PUS
list L2 = E IAU
loop foreach i L1 --quiet
eval varname(i)
eval varname(varnum($i))
eval $i
endloop
loop foreach i L2 --quiet
eval varname(i)
eval varname(varnum($i))
eval $i
endloop
</hansl>
As far as I can think, all the evaluations should exhibit the same results inside each loop. Am I correct?
Best regards,
Henrique Andrade
Sent from my iPhone
6 years, 4 months

Computing an index for unique combinations of discrete variables
by Giuseppe Vittucci

Hi,
I have firm level data and two categorical variables (region and
sector).
I need to define another variable which is an index identifying the
unique combinations region-sector each firm belongs to, so I can use it
in computing cluster-robust s.e.
One way to do this is to use the command "values" for region and sector
and then use a nested loop, but this seems quite time-consuming...
Is there a simpler way in gretl to do it?
BTW, it could be useful to allow one to use the option "cluster" also
with the FE estimator.
Since the robust s.e. used in FE is the Arellano estimator and this is a
s.e. clusterized over cross-sectional units and thus it can be
considered a specification of the cluster-robust estimator, it seems
quite natural to allow one to identify clusters different from the
units.
Something like:
panel y 0 x --robust=cvar
or
panel y 0 x --cluster=cvar
where the default behavior
panel y 0 x --robust
is to clusterize over cross-sectional units.
Bye
Giuseppe
6 years, 4 months

Crash with matrix command in 1.9.91cvs?
by "Juan C. Estévez"

Hi colleagues,
Has anybody the problem of a gretl's chash, trying to run the command
matrix M={ , , }?
Example:
Data: anscombe.gdt
Command in Gretl console or in Gretl script: matrix Z = { x, y1, y2}
Gretl version : 1.9.91cvs (MsWindows x86_64) on Windows 8.1
Language: Galician (also in English and in German)
(In Gretl last 'official' release 1.9.90 it works fine to me)
Best regards
--
Juan C. Estévez
Universidade de Santiago de Compostela
6 years, 4 months