gretl 1.9.10 and "make check"
by Allin Cottrell
It has been pointed out to me that "make check" fails for
the gretl 1.9.10 release. This is not a substantive failure,
it's a bug in the build process for the checker program. And
this is now fixed in CVS. I'll post a small patch that fixes
the issue for the released code before long.
My apologies for any inconvenience caused.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
11 years, 11 months
Dummy matrices
by Pindar
Hi,
there is this nice way to construct new series with the use of "...? ... :"
But this method seems not to work for matrices. The ".>" operator just
works 'on his own'.
<hansl>
nulldata 10
set optimizer bfgs
series test=normal()
matrix testm={test}
series ytest=test>0
matrix ytestm=testm.>0 *#this works*
series mtest = ytest ? 10 : 2
print ytest mtest -o
matrix mtestm = (ytestm.>0) ? 10 : 2 *#this works not*
eval mtestm
matrix mtestm=zeros(rows(ytestm),1)
loop for i=1..rows(ytestm) -q
matrix mtestm[i] = (ytestm[i]>0) ? 10 : 2
endloop
eval mtestm
<hansl>
Cheers
Leon
11 years, 11 months
Gnuplot line and scatter from 2 matrices
by Michael Boldin
Thank you Henrique for showing me how to use --matrix= as an option
for gnuplot. I simply missed this option in the manual.
Now I think I have something not in the manual:
Can I plot 2 sets of X-Y variables in a single gnuplot
with one showing a connected line and the other x points ?
The problem is the 2 sets have different matrix lengths (rows)
The following gnuplot input gives the basic look
but I have about 10,000 more scatter points to plot
# set term pngcairo font "verdana,8"
set encoding utf8
set style line 1 lc rgb "#ff0000" lw 2
set style line 2 lc rgb "#ff0000"
set xzeroaxis
set title "Mean-Variance Efficient Frontier"
set ylabel "Expected return"
set xlabel "Std-dev"
set grid ytics
set yrange [0:8]
set xrange [0:100]
plot \
'-' using 1:($2) title "" w lines, '-' using 1:($2) title "" w points
37.34392177 2.97360052
38.93497674 3.315788614
41.15302283 3.657976708
43.90313334 4.000164802
47.09218512 4.342352895
50.63731467 4.684540989
54.46904008 5.026729083
58.5311026 5.368917177
62.7788067 5.71110527
e
47.87386803 4.236153823
53.21768427 4.637368399
48.34658154 4.233955778
52.43479596 4.640319946
51.23960034 4.49318912
63.37821207 5.368805231
51.19436633 4.531811607
55.52425526 4.746143464
57.27659417 4.984767162
50.46428986 4.468835106
52.99520784 4.614860001
52.77690827 4.707596727
47.30102507 4.201675871
50.27836542 4.500478414
e
I could live with
gnuplot 1 2 --matrix=A --input="@fname" --output=display
with a file holding the line values, but I could not seem to combine
--matrix & --input
and it seems you can not add the line using plot commands enclosed in { }
either. Am I right about this?
11 years, 11 months
Scripthighlighting How to print?
by Pindar
Hi,
I was searching the mails and as it seems printing the
scripthighlighting should work for a year now.
However, on my Windows 7 PC with latest snapshot (and gedit installed,
was in vain) it does not work.
Do I need to change some preferences or such?
Thanks
Leon
11 years, 11 months
General question about loops
by Logan Kelly
Hello,
The following two code fragments seem at first glance to be the same
loop i = 1..3
and
loop for (i=1; i<=3; 1+=1)
Could someone comment on the best practice of when to use what loop type?
Also, one could loop over a list using an index loop or a foreach loop. Which is best practice when? Are there any general guidelines?
Thanks
Logan
--
Logan J. Kelly, Ph.D.
Assistant Professor, Department of Economics
Director, UWRF Center for Economic Research
http://www.uwrf.edu/cer
23 D South Hall
College of Business and Economics
University of Wisconsin - River Falls
410 S. Third Street
River Falls, WI 54022-5001
11 years, 11 months
Performing ADF test, inside loop
by huugh@centrum.cz
Hi,
I have 4 time series measured for 28 different countries + 6 exogenous time series.
The data are in time series representation, therefore I have 4*28+6=118 variable IDs.
The three exogenous series start the series.
Following 28 variable IDs represent the first variable for the 28 countries, next 28 IDs represent the second variable for the 28 countries etc.
I intend to perform: ADF test for all of the variables and Engle-Granger test for pairs with countries (for the 4 series) like this: exogenous variable + each of the countries' variable.
I intended to execute this code:
loop for (tmp_country=1; tmp_country<=28; tmp_country+=1)
country_code1=$tmp_country-1+7
country_code2=$tmp_country-1+35
country_code3=$tmp_country-1+63
country_code4=$tmp_country-1+91
# here is the crucial part of the question, how to do this:
adf 12 country_code1 --c --ct --test-down
The question is, how do I reference the variable ID in the ADF command? If I put the above in, Gretl reports that country_code1 is not a series name - obviously, I want to execute this command: adf 12 7 --c --ct --test-down
Thanks.
11 years, 11 months