small practical issue
by Artur T.

Hi gretl users,
I am looking for a simple way to determine the column for which scalar B
is, let's say, larger or equal to the entry A[i] and store this
information in scalar C. If B is never greater than any entry in A[i], C
is zero.
Reading out each entry via a loop is possible, but I am wondering
whether there is a short-cut to this.
C = 0
A = seq(4,1)
B = 3
# check at which entry A[i] the value of B >= A[i]
Maybe somebody a nice suggestion :-)
Artur
10 years

Vertical line
by Alessandro Attanasio

Dear all,
how I can create a vertical line in a time series plot?
Thanks
Best regards.
Alessandro Attanasio
10 years

Bug in value labels in functions
by Giuseppe Vittucci

Hi,
when the value labels in functions include spaces gretl 1.9.13 returns
an error (the previous version worked as expected...)
Here is a simple code to reproduce the error.
1) This works:
function scalar pippo (
int p[0:1:1] {"pippoA","pippoB"})
return p
end function
2) This flags an error:
function scalar pippo (
int p[0:1:1] {"pippo A","pippo B"})
return p
end function
gretl version 1.9.13
Current session: 2013-11-18 22:05
? function scalar pippo ( int p[0:1:1] {"pippo A","pippo B"})
> function scalar pippo ( int p[0:1:1] {"pippo A","pippo B"})
p: found 2 values but 3 value-labels
Error executing script: halting
> function scalar pippo ( int p[0:1:1] {"pippo A","pippo B"})
Giuseppe
10 years

Something wrong with sample rectriction in panel data
by Giuseppe Vittucci

Dear,
sample restriction does not seem to work well in panel data...
I have recently installed gretl 1.9.13 on my laptop.
Here are the issues:
1) when you restrict the sample, gretl continues to put the indication
"Full range" in the status bar.
Example:
open greene14_1.gdt
smpl year > 1970 --restrict --replace
"Full range" in the status bar does not disappear.
2) the option time-dummies in the panel command does not work as
expected when the sample is restricted and it also messes all the time
dummies.
Example:
open greene14_1.gdt
genr timedum
panel C 0 Q PF LF dt_*
panel C 0 Q PF LF --time-dummies
The previous commands work as expected and the last two estimates are
equal as they should be.
Instead, if you restrict the sample, the two estimates are different:
smpl year > 1972 --restrict --replace
panel C 0 Q PF LF dt_*
panel C 0 Q PF LF --time-dummies
The former is correct, whereas the latter includes less time dummies...
Moreover, it rewrites the time dummies and completely messes them...
Giuseppe
10 years

LIML without constant: issue?
by Matthieu Stigler

Hi
I tried to use the IV-LIML estimator on a super simple model that does not
include any constant (both in regressors and instruments). However, when
trying to do so, I get an error message, like "data error" (actually:
"erreur de donnée" in the french version). It seems however possible to run
the same model under 2SLS.
Is this on purpose? If not, maybe the code could be adjusted? I has
probably something to do with the fact that the first M projection matrix
becomes an identity under such circumstances?
Thanks!!
Matthieu
10 years

estimation model AR (1)-GARCH (1, 1) and forecasts out of sample
by lucia_casaburi_90＠alice.it

hi Gretl users,I'm writing the thesis on the analysis of financial time series and I have a question. How to estimate a model AR (1)-GARCH (1,1) using the console commands? And how do the dynamic forecast out of sample on the conditional variance?Thank you for attentionlucia
10 years

estimation model AR (1)-GARCH (1, 1) and forecasts out of sample
by lucia_casaburi_90＠alice.it

hi Gretl list,I'm writing the thesis on the analysis of financial time series and I have a question. how to estimate a model AR (1)-GARCH (1,1) using the console commands? and how do the dynamic forecast out of sample on the conditional variance?Thank you for attentionlucia
10 years

Autoregressive use of lincomb error
by Pindar Os

Hi there,
the lincomb function does not produce correct resultes when applied in the
way presented below namely in a panel with autoregressive calculation:
<hansl>
open abdata.gdt
# correct variant
smpl full
series CAP_test = CAP
smpl YEAR>=1980 && YEAR<1984 --res --rep --bal
series CAP_test = 0.5*CAP_test(-1)
print -o CAP CAP_test
series CAP_test_correct = CAP_test
# efficient variant
smpl full
series CAP_test = CAP
smpl YEAR>=1980 && YEAR<1984 --res --rep --bal
list xList = CAP_test(-1)
matrix coeffs = {0.5}
series CAP_test = lincomb(xList,coeffs)
print -o CAP_test_correct CAP_test # different results from t+2 on
<hansl>
Best
Leon
10 years

LM Test
by Mark

How is the LM test calculated for Gretl for just a standard model.
I just ran a model
Model 5: OLS, using observations 1-2017
Dependent variable: nettfa
coefficient std. error t-ratio p-value
---------------------------------------------------------
const -20.9850 2.47202 -8.489 3.98e-017 ***
inc 0.770583 0.0614520 12.54 8.73e-035 ***
age25 0.0251267 0.00259339 9.689 9.96e-022 ***
male 2.47793 2.04778 1.210 0.2264
e401k 6.88622 2.12327 3.243 0.0012 ***
Mean dependent var 13.59498 S.D. dependent var 47.59058
Sum squared resid 3982124 S.E. of regression 44.48805
R-squared 0.127868 Adjusted R-squared 0.126134
F(4, 2012) 73.74763 P-value(F) 2.18e-58
Log-likelihood -10514.46 Akaike criterion 21038.91
Schwarz criterion 21066.96 Hannan-Quinn 21049.21
When I save the residuals squared to run the Pagan test I get this
Model 6: OLS, using observations 1-2017
Dependent variable: usq5
Coefficient
Std. Error
t-ratio
p-value
const
-4573.55
1848.7
-2.4739
0.01345
**
inc
112.358
45.9568
2.4449
0.01458
**
age25
4.84866
1.93946
2.5000
0.01250
**
male
2331.25
1531.43
1.5223
0.12810
e401k
1164.83
1587.89
0.7336
0.46330
Mean dependent var
1974.280
S.D. dependent var
33367.52
Sum squared resid
2.23e+12
S.E. of regression
33270.33
R-squared
0.007789
Adjusted R-squared
0.005817
F(4, 2012)
3.948695
P-value(F)
0.003387
Log-likelihood
-23861.35
Akaike criterion
47732.70
Schwarz criterion
47760.75
Hannan-Quinn
47742.99
The LM test from my understanding is n*r^2, which here would be 15.71
Using gretl's built in test I get the following:
Breusch-Pagan test for heteroskedasticity
OLS, using observations 1-2017
Dependent variable: scaled uhat^2
coefficient std. error t-ratio p-value
--------------------------------------------------------
const -2.31657 0.936391 -2.474 0.0134 **
inc 0.0569109 0.0232777 2.445 0.0146 **
age25 0.00245591 0.000982363 2.500 0.0125 **
male 1.18081 0.775689 1.522 0.1281
e401k 0.590001 0.804287 0.7336 0.4633
Explained sum of squares = 4485.49
Test statistic: LM = 2242.746588,
with p-value = P(Chi-square(4) > 2242.746588) = 0.000000
How did the LM test become so big for this model?
10 years

Testing the endogeneity of one or more regressors in a pooled OLS model?
by Clive Nicholas

Clearly I've missing something obvious, but how does one do this?
Correlating the variable with the model residuals to assess this is, I
believe, incorrect.
I consulted the guide and turned up dry, ditto the command reference.
Running the coefficient covariance matrix doesn't include the residuals.
I've also run a Google search and could only find this:
http://lists.wfu.edu/pipermail/gretl-users/2011-July/006470.html
which isn't quite what I'm looking for. This should be straightforward, so
your assistance would be very much appreciated.
--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology.
I prefer to call it style." -- Freeman J. Dyson
10 years