Page 1 of 1

dseries data import not working in octave

PostPosted: Mon Oct 06, 2014 9:50 pm
by excessliquid
Hello,

I am running dynare 4.4.1 with octave 3.8 in Ubuntu. When I try and import the attached csv (renamed as a .mod because not allowed csv) with dseries (i.e x = dseries('/home/docs/blahcast.csv')), Dynare only imports the column headings and the first date row (1984Q1). It will not import any of the rest of the data.

The odd thing is, when I use dynare 4.1.1 in matlab, the import works fine. I can't see anything obvious in the dataset that would mess up the data import.

Re: dseries data import not working in octave

PostPosted: Tue Oct 07, 2014 5:10 am
by jpfeifer
There was a bug in 4.4.1. Have you tried this with the most recent snapshot?

Re: dseries data import not working in octave

PostPosted: Tue Oct 07, 2014 8:41 pm
by excessliquid
I did try to get 4.3.3, but assumed it wasn't actually available. Adding "deb http://www.dynare.org/ubuntu trusty main contrib" via Synaptic just shows 4.4.1 as available. Using the Ubuntu software manager shows 4.4.3 as an option but reverts to 4.4.1 everytime you click install.

BTW. Is there even a way to check what version is installed in Ubuntu? The folder is not named with the version number.

Re: dseries data import not working in octave

PostPosted: Wed Oct 08, 2014 9:46 pm
by excessliquid
Would anyone know how to get 4.4.3 installed? The instructions here: http://www.dynare.org/DynareWiki/Instal ... anOrUbuntu don't work (i have the key and apt line in synaptic).

Re: dseries data import not working in octave

PostPosted: Thu Oct 09, 2014 8:27 am
by jpfeifer
Sorry, I cannot help you with Linux. But the problem here comes from the m-files, not the preprocessor or the mex-files. Thus, you could try replacing the m-files in matlab-folder with the ones of the 4.4.3 version. In that case, you do not need to build Dynare.

Re: dseries data import not working in octave

PostPosted: Thu Oct 09, 2014 9:28 pm
by excessliquid
So I have managed to get 4.4.3 installed. I still have exactly the same problem. In Octave, only the headers and first row of data import. In matlab it works fine.

For anyone who has problems getting 4.4.3: you need to uncheck all of the dynare offical repositories in Synaptic and then refresh in order to be able to see 4.4.3 version of dynare. Otherwise it seems like 4.4.1 from the official repostory "override" the newer version so you cannot see it.

Re: dseries data import not working in octave

PostPosted: Fri Oct 10, 2014 3:48 pm
by HoutanBastani
This is a bit more complicated than I thought. We use csv2cell to read a csv file. According to the documentation http://octave.sourceforge.net/io/function/csv2cell.html, the maximum line length is 4096 characters. The first line of your csv file has 8112 characters, so the Octave function does not work as expected.

We will try to find another function to use and, if we can't, we'll find a work around or document it. In the meanwhile, you can split your csv file, read in multiple dseries, then join them together into one using the dseries concatenation operator: [].

We'll post here once the problem is fixed or the manual is updated.