Hi Allin,
Thanks for the example program. I've fixed the reference errors (have
send an email 5min ago).
On a different note. I'm new to gretl and still struggeling to figure
out how to work with DATASET. I have a double array with my time series
samples. I want to create a DATASET directly from this array (without
reading it from file or DB). This is what I've done:
int length = 8;
double d[] = {0.1, 0.2, 0.3, 0.2, 0.1, 0.3, 0.4, 0.6};
DATASET *data = create_new_dataset(length, 1, 0);
dataset_add_series_as(data, d, "data");
Is this the correct way of doing it?
Chris
On 2014/03/29 12:30 PM, Allin Cottrell wrote:
On Sat, 29 Mar 2014, GOO Creations wrote:
> I'm trying to estimate the parameters for an ARMA model and then
> forecast the next value. I've linked the library (libgretl-1.0) to my
> program and am able to create datasets and estimate the ARMA model.
> I'm however unable to use the forecast code.
>
> I've noticed that forecast.h is not included in libgretl.h, which
> seems strange.
libgretl.h includes the "basic" gretl headers, but for some extra
functionality it's necessary to include additional headers. This is
indicated in the API doc, for example
http://gretl.sourceforge.net/API/new/gretl/gretl-Forecasting.html
> So I manually added forecast.h to my program. I now get *undefined
> references* to all the functions in forecast.h. So I assume the
> forecast functionality is not part of the libgretl-1.0 library.
It is included in libgretl. I don't know why you would be getting
undefined references. I'm attaching a sample C file and accompanying
Makefile which illustrates obtaining a forecast after ARMA estimation.
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users