On Thu, 22 Oct 2020, riles(a)triton.net wrote:
Hello Allin
Below you will find a complete compilable cpp program that
demonstrates that the corrgram() function does not plot(at least
on my machine) the ACF and PACF when called through the c/c++ api.
I use the dataset from /share/gretl/data/ramanathan/data9-7.gdt .
The only library that this program is linking to is gretl-1.0.
Thanks, Riley. I'm attaching a modified version which displays the
plot.
The main point is that when you call libgretl independently the
paths to third-party programs such as gnuplot are not registered,
so it's necessary to call gretl_set_path_by_name() to tell the
library where to find gnuplot.
I've also modified the file to illustrate (a) two methods of
generating the plot, and (b) how to use the residual from a model as
the series to work on. Hopefully these points should be reasonably
self-explanatory but feel free to come back with questions.
Allin