undefined reference when trying to compile
by Salman Khan
Hello,
I'm trying to compile a test program from one of the libgretl examples on 64bit Linux Mint 17.3. My goal is to call gretl routines from C.
I think configure went ok (linked it to lapack: sudo LAPACK_LIBS=/usr/lib/liblapack.a ./configure). Then make, make install and sudo ldconfig.
I run the following command (and other countless variations) to compile:gcc -o gretl_test -L/usr/local/lib/libgretl-1.0.so `pkg-config --cflags --libs glib-2.0` gretl_test.c
However, I get the following errors:/tmp/ccCyYTcx.o: In function `main':gretl_test.c:(.text+0x22): undefined reference to `libgretl_init'gretl_test.c:(.text+0x31): undefined reference to `gretl_print_new'gretl_test.c:(.text+0x3a): undefined reference to `datainfo_new'gretl_test.c:(.text+0x51): undefined reference to `gretl_read_native_data'gretl_test.c:(.text+0x83): undefined reference to `pprintf'gretl_test.c:(.text+0x94): undefined reference to `errmsg'gretl_test.c:(.text+0xb0): undefined reference to `pprintf'gretl_test.c:(.text+0xc5): undefined reference to `print_smpl'gretl_test.c:(.text+0xd8): undefined reference to `varlist'gretl_test.c:(.text+0xe4): undefined reference to `destroy_dataset'gretl_test.c:(.text+0xf0): undefined reference to `gretl_print_destroy'gretl_test.c:(.text+0xf5): undefined reference to `libgretl_cleanup'
I'm a relatively new convert to linux as well as gretl, is there something obvious that I'm missing?
Thank you.
8 years, 6 months
[summary] -- accessors?
by Schaff, Frederik
Hi there,
I was wondering how one might access the info from the summary command with the use of accessors, i.e. something like $min or the like. I am using loops to calculate some statistics for different subsamples of a cross-over dataset (hmm is there a correct name for monte carlo simulation data which is already processed to summary statistics?). At the moment I am using min(data), max(data), and calculate, e.g., the cv "by hand".
By the way, a suggestion: It would be very useful if the help-menu entries would entail the information for the accessors (a little bit more self-contained). I guess everything that is calculate by any of the functions is already stored somehow ;)
Regards and many thanks
Frederik
------------
Frederik Schaff, Dipl.-Volkswirt
University of Hagen
Department of Business and Economics
Chair of Economic Theory (Prof. A. Endres)
Universitätsstraße 11 (TGZ)
58097 Hagen
Phone: +49 (0) 2331 987-4454
E-Mail: Frederik.Schaff(a)FernUni-Hagen.de
http://www.fernuni-hagen.de/wirtschaftstheorie/en/team/frederik.schaff.shtml
8 years, 7 months
Re-ordering of VECM coefficients
by Sven Schreiber
Hi,
this message is mostly for myself, for future reference :-)
But maybe somebody else is also struggling from time to time with the
problem on how the coefficient ordering in a VECM is done in the
accessors $vecGamma and $coeff. So here's a function that does the
reordering.
Because of the "null" default for the second matrix argument and because
of the "exists" function, I think you need a fairly recent gretl version
for this.
<hansl>
function matrix vecpar2coeff(matrix Gammas, matrix alpha[null])
# translates the ordering of the $vecGamma accessor for VECMs
# to the ordering of $coeff
n = rows(Gammas)
p = cols(Gammas) / n + 1
matrix gix = seq(1,n) ** ones(1,p-1) + \
ones(1,n) ** seq(0, n*(p-2), n)
return exists(alpha) ? Gammas[,gix]' | alpha' : Gammas[,gix]'
end function
</hansl>
This is actually tested, but only in one case.
Corrections and extensions welcome,
cheers,
sven
8 years, 7 months
Restriction on model coefficients
by Carlo Maria Petrangelo
Hello everyone,
I need to estimate an equation with tsls. This equation has a restriction on
parameters. The restriction has inside itself values coming from the
estimation parameters of another equation and it is the following:
b3=[a1/(1-a2)](1-b2)-b1, on which "a" indicate a parameter of the first
equation (already estimated) and "b" indicate a parameter of the second
equation (which has to be estimated with tsls) and the numbers indicate the
parameter associated to a regressor.
How can I estimated the second equation once I have estimated the first.
Thank you for the support!
8 years, 7 months
Input of csv data - does the German version work as intended?
by Wingenroth, Thorsten
Hi,
Gretl let me down :( Full of enthusiasm I praised Gretl to my students, but they couldn't even import my csv files with their current release! So I got me their version 2016a and did some experiments. I found out the following:
The import dialogues for the German and English versions are different. If you set up the right decimal separator in the German version, everything works fine. If you got it wrong (which my students did), the dialogue NEVER reappears! So you have no chance to correct your mistake and you will not be able to load any file with different decimal settings.
Could you please correct this and let the import dialogue reappear? If a user has different sources with different separator rules, he should be able to adjust the settings for each file. Or is there any "settings" option at another place that I am not aware of?
Current workaround is to change the language setting back to English, restart and set it back to German. Then the dialogue will reappear.
Thanks for your help!
Kind regards,
Thorsten
Prof. Dr. Thorsten Wingenroth
Professor für Lehraufgaben BWL-Bank
Fakultät Wirtschaft | Studienzentrum Finanzwirtschaft (Center of Finance)
Duale Hochschule Baden-Württemberg Stuttgart
Baden-Wuerttemberg Cooperative State University Stuttgart
Herdweg 18 | 70174 Stuttgart
Fon +49 711 1849-766
thorsten.wingenroth(a)dhbw-stuttgart.de<mailto:thorsten.wingenroth@dhbw-stuttgart.de> | http://www.dhbw-stuttgart.de/bank
Master in Business Management - Banking & Finance
http://www.dhbw.de/master-finance
8 years, 7 months
Markers: different behavior with strings and series
by Henrique Andrade
Dear Gretl Team,
I found an unexpected (at least for me) behavior using "markers"
command. Please take a look at the following code snippets and the
resulting output:
Input (1):
setobs 6 1:1 --stacked-time-series
genr markers = "%s:%02d", "2015", time
Output (1):
preco
2015:01 0
2015:02 24300
2015:04 0
2015:05 43492
2015:06 375277
When I try to use a series instead of a string I get this result:
Input (2):
setobs 6 1:1 --stacked-time-series
series ano = 2015
genr markers = "%d:%02d", ano, time
Output (2):
preco
2015: 01
01
0 0
2015:02 24300
2015:03 0
2015:04 0
2015:05 43492
2015:06 375277
Is this the intended behavior?
Best,
Henrique Andrade
8 years, 7 months
not getting all the commands on ADD
by Narandra Dashora
While using GRETL I am not getting all the commands on ADD except Log.
How to fix this problem ?
N.K.Dashora
Udaipur ( Rajasthan )
India
8 years, 7 months