dseries issueshttps://git.dynare.org/Dynare/dseries/-/issues2023-08-31T09:36:42Zhttps://git.dynare.org/Dynare/dseries/-/issues/56Fix handling of leading missing values in x132023-08-31T09:36:42ZJohannes PfeiferFix handling of leading missing values in x13The x13 `print` method discards leading NaN in the data:
```
p1 = firstobservedperiod(o.y);
p2 = lastobservedperiod(o.y);
...
fprintf(fid, ' data = %s', sprintf(data2txt(o.y(p1:p2).data)));
```
However, the `run`-method passes the result...The x13 `print` method discards leading NaN in the data:
```
p1 = firstobservedperiod(o.y);
p2 = lastobservedperiod(o.y);
...
fprintf(fid, ' data = %s', sprintf(data2txt(o.y(p1:p2).data)));
```
However, the `run`-method passes the results back as a `dseries` starting with the first `NaN`-period `o.y.init` instead of `o.y.firstobservedperiod`:
```
o.results.(savedoutput{i}) = dseries(data(:,2), o.y.init, savedoutput{i});
```
It seems all occurrences of `o.y.init` in `run` should be `o.y.firstobservedperiod`https://git.dynare.org/Dynare/dseries/-/issues/57Filter out data series with NaN passed to x132023-08-30T12:13:31ZJohannes PfeiferFilter out data series with NaN passed to x13`x13` does not handle missing values. The `print`-method already removes leading and trailing `NaN`. But we do not check for intermediate `NaN`, which will trigger `x13` to fail. It would be preferable to return a meaningful message in t...`x13` does not handle missing values. The `print`-method already removes leading and trailing `NaN`. But we do not check for intermediate `NaN`, which will trigger `x13` to fail. It would be preferable to return a meaningful message in this case.https://git.dynare.org/Dynare/dseries/-/issues/54Add method for cleaning up after x11 run2023-05-27T12:46:33ZJohannes PfeiferAdd method for cleaning up after x11 runRuns of x11 will create various files with random names and endings like `d10,err,log,out,spc` in the main folder. We should add a routine that allows cleaning it.Runs of x11 will create various files with random names and endings like `d10,err,log,out,spc` in the main folder. We should add a routine that allows cleaning it.6.xStéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dseries/-/issues/53Fix crash after using insert2023-05-12T16:06:53ZJohannes PfeiferFix crash after using insertSee https://forum.dynare.org/t/dseries-insert-doesnt-carry-the-new-index/22386/5
```
clear all
load acetylene.mat
ds_example = dseries(y)
size(ds_example)
ds_nan = dseries(NaN, ds_example.dates, "inserted_Variable")
ds_example1 = insert(...See https://forum.dynare.org/t/dseries-insert-doesnt-carry-the-new-index/22386/5
```
clear all
load acetylene.mat
ds_example = dseries(y)
size(ds_example)
ds_nan = dseries(NaN, ds_example.dates, "inserted_Variable")
ds_example1 = insert(ds_example, ds_nan{1}, 1) % we succesfully insert a variable
size(ds_example1) % check what we’ve done
ds_example1{1} % works
ds_example1{end} % doesn’t work (ds_example1{2} and ds_example1{‘Variable_1’} don’t work either)
```
crashes with
> Index exceeds the number of array elements. Index must not exceed 1.
>
> Error in indexing (line 305)
> r.ops = o.ops(idx);
, presumably due to a problem with populating the command history.https://git.dynare.org/Dynare/dseries/-/issues/11create methods to calculate T/T.A, G.A, A/A2021-05-26T20:50:08ZHoutan Bastanicreate methods to calculate T/T.A, G.A, A/AUseful transformationsUseful transformationshttps://git.dynare.org/Dynare/dseries/-/issues/10Problems when used under parfor2021-05-26T20:48:53ZTom HoldenProblems when used under parforSuppose you estimate a DSGE model by ML, forcing the optimisation route to use the parallel pool for derivative computations, then you get similar warnings to the ones mentioned here: https://www.mathworks.com/matlabcentral/newsreader/vi...Suppose you estimate a DSGE model by ML, forcing the optimisation route to use the parallel pool for derivative computations, then you get similar warnings to the ones mentioned here: https://www.mathworks.com/matlabcentral/newsreader/view_thread/251091 followed by an error.
Perhaps loadobj and saveobj methods are needed? At the moment I'm trying to hack in a solution by getting dsge_likelihood.m to convert structs to dseries if needed.https://git.dynare.org/Dynare/dseries/-/issues/4create syntax to compare dseries to numbers2021-05-26T20:36:36ZHoutan Bastanicreate syntax to compare dseries to numberse.g. if `a` is a dseries, the command `a>0` would return a vector/matrix of all elements in a.data that are greater than 0
e.g. if `a` is a dseries, the command `a>0` would return a vector/matrix of all elements in a.data that are greater than 0
https://git.dynare.org/Dynare/dseries/-/issues/7modify rename to take one argument2021-05-13T14:22:18ZHoutan Bastanimodify rename to take one argumentif a `dseries` contains only one time series, when using the `rename` method, allow it to take just one argument. In this case, that argument will overwrite the name of the only series in the `dseries`. Useful in this situation (qd is a ...if a `dseries` contains only one time series, when using the `rename` method, allow it to take just one argument. In this case, that argument will overwrite the name of the only series in the `dseries`. Useful in this situation (qd is a dseries with multiple series):
```
a = 100*(exp(qd.myseries/100)-1);
a = a.rename('myseries');
```
Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dseries/-/issues/8add new field, keep name field constant2021-05-13T14:22:17ZHoutan Bastaniadd new field, keep name field constantAs per the discussion in #7, add a new field to `dseries` that keeps track of the operations that have been taken on that series. In doing so, the `name` field should now remain constant.As per the discussion in #7, add a new field to `dseries` that keeps track of the operations that have been taken on that series. In doing so, the `name` field should now remain constant.Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dseries/-/issues/46Should not fail when an empty dates object is concatenated with a dates objec...2021-05-13T14:15:31ZHoutan BastaniShould not fail when an empty dates object is concatenated with a dates object with a certain frequecyCurrently this fails:
```
[dates('1y') dates()]
```
I would propose to let it pass, having the resulting output be:
```
ans = <dates: 1Y>
```
@stepan-a what do you think?Currently this fails:
```
[dates('1y') dates()]
```
I would propose to let it pass, having the resulting output be:
```
ans = <dates: 1Y>
```
@stepan-a what do you think?https://git.dynare.org/Dynare/dseries/-/issues/47bug in double for dates at yearly frequency2021-05-13T14:15:31ZMarco Rattobug in double for dates at yearly frequencyfor a dates object
```
dd=dates('2001Y');
```
the double of it provides `2000`
```
dd.double
ans =
2000
```for a dates object
```
dd=dates('2001Y');
```
the double of it provides `2000`
```
dd.double
ans =
2000
```5.xSébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dseries/-/issues/45Compatibility issue with MATLAB R2014a2021-01-27T17:30:42ZSébastien VillemotCompatibility issue with MATLAB R2014aIf one runs:
```
x = dseries(ones(2,2),'1Y',{'A1'; 'A2'});
y = { 'A1', 'A2'};
x{y{:}}.data(2:end, :)
```
The result is correct under MATLAB R2020b:
```
ans =
1 1
```
But it is incorrect under MATLAB R2014a:
```
ans =
1
`...If one runs:
```
x = dseries(ones(2,2),'1Y',{'A1'; 'A2'});
y = { 'A1', 'A2'};
x{y{:}}.data(2:end, :)
```
The result is correct under MATLAB R2020b:
```
ans =
1 1
```
But it is incorrect under MATLAB R2014a:
```
ans =
1
```
Note that this is not a purely theoretical problem. It causes the failure of `tests/smoother2histval/fs2000_simul.mod` under R2014a.5.xStéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dseries/-/issues/2CSV loading broken under Octave2021-01-22T13:42:04ZSébastien VillemotCSV loading broken under OctaveCommit DynareTeam/dynare@a2bd920d6f098b6a80be1f75d60cbd22c42899f5 (which has been incorporated into deseries with the location change of `load_csv_file_data`) has broken CSV loading under Octave.
There are two problems:
- if the first l...Commit DynareTeam/dynare@a2bd920d6f098b6a80be1f75d60cbd22c42899f5 (which has been incorporated into deseries with the location change of `load_csv_file_data`) has broken CSV loading under Octave.
There are two problems:
- if the first line is less than 4097 lines, then the io package is loaded but not used, so the data are not read
- in the other case, the code which is run is broken. In particular, the variables `withnames` and `withtime` are not defined (this bug is triggered by test number 4 of `name2tex.m`)
Moreover, I think it would make sense to allow people who don't have the io package to always use the replacement code (when fixed). Currently, people who don't have the io package can read files where the first line is > 4097, but not the smaller ones.
Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dseries/-/issues/3recreate repository with history from dynare.git2021-01-22T13:42:04ZHoutan Bastanirecreate repository with history from dynare.gitUse the `git subtree split` command to extract all commits that impacted this repository from within DynareTeam/dynare and recreate this repository with that commit history. As it currently stands, if we want to see the modifications mad...Use the `git subtree split` command to extract all commits that impacted this repository from within DynareTeam/dynare and recreate this repository with that commit history. As it currently stands, if we want to see the modifications made to a given file (as I just had to do for `load_csv_file_data.m` in #2), we have to go DynareTeam/dynare, `reset` to a point in time when the file existed in the repository, then use `gitk`.https://git.dynare.org/Dynare/dseries/-/issues/5problem when using empty dseries to create a dseries2020-12-18T18:29:03ZHoutan Bastaniproblem when using empty dseries to create a dseries```
tseries = dseries();
a = tseries(randn(3,1)) % doesn't work
```
```
tseries = dseries();
a = tseries(randn(3,1)) % doesn't work
```
https://git.dynare.org/Dynare/dseries/-/issues/44Integration with DBnomics2020-06-25T09:43:31ZSébastien VillemotIntegration with DBnomicsAllow the construction of series using identifiers or other criteria.
Inspiration could be taken from the API of the [rdbnomics package](https://github.com/dbnomics/rdbnomics).Allow the construction of series using identifiers or other criteria.
Inspiration could be taken from the API of the [rdbnomics package](https://github.com/dbnomics/rdbnomics).https://git.dynare.org/Dynare/dseries/-/issues/43columns() function is missing in dseries2020-03-02T08:52:07ZMichelJuillardcolumns() function is missing in dseriesWhen one attempts to use ``dseries`` standalone without Dynare, one gets the following error:
```
To use 'columns', the following product must be licensed, installed, and enabled:
Database Toolbox
Error in dseries/vobs (line 28)
s = c...When one attempts to use ``dseries`` standalone without Dynare, one gets the following error:
```
To use 'columns', the following product must be licensed, installed, and enabled:
Database Toolbox
Error in dseries/vobs (line 28)
s = columns(o.data);
Error in dseries/display (line 34)
if ~vobs(o)
```
because the columns() function is offered by Dynare in ``missing/rows_columns/columns.m``Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dseries/-/issues/41Logic for detection of bitwidth (32 or 64) for x13as binary is incorrect2019-10-03T14:59:33ZSébastien VillemotLogic for detection of bitwidth (32 or 64) for x13as binary is incorrectThe function `src/utilities/is/is64bit.m` is used to decide whether we use a 32-bit or 64-bit binary of x13as.
The logic of this test is doubly wrong.
First, it claims to check whether MATLAB or Octave is 32-bit or 64-bit, but it does ...The function `src/utilities/is/is64bit.m` is used to decide whether we use a 32-bit or 64-bit binary of x13as.
The logic of this test is doubly wrong.
First, it claims to check whether MATLAB or Octave is 32-bit or 64-bit, but it does it by checking the maximum size of matrix indices (there are 64-bit version of Octave which have a 32-bit index).
But, fundamentally, testing the bitwidth of MATLAB/Octave is not what we want, since x13as is an independent executable. We should rather test whether the operating system is 32- or 64-bit, as is currently done for the preprocessor binary.https://git.dynare.org/Dynare/dseries/-/issues/39Fix x13 on Octave2018-12-12T13:48:11ZStéphane Adjemianstepan@adjemian.euFix x13 on OctaveThree unit tests are failing because when reading the files produced by the X13 binary. The problem seems to be that the behaviour of `importdata` is different under Octave and Matlab.Three unit tests are failing because when reading the files produced by the X13 binary. The problem seems to be that the behaviour of `importdata` is different under Octave and Matlab.Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dseries/-/issues/16Make load_mat_file_data robust against matrices in file or provide more infor...2018-12-11T18:18:58ZJohannes PfeiferMake load_mat_file_data robust against matrices in file or provide more informative error`load_mat_file_data` is loading all variables in a mat-file and puts them into a matrix via
`
data = [data, tmp(:)];
`
However, if the datafile contains a matrix, this triggers the error
`load_mat_file:: All the vectors (va...`load_mat_file_data` is loading all variables in a mat-file and puts them into a matrix via
`
data = [data, tmp(:)];
`
However, if the datafile contains a matrix, this triggers the error
`load_mat_file:: All the vectors (variables) in must have the same number of rows (observations)!`
We should either
1. Adjust the error message to say that only vectors are allowed and/or
2. Only try to read the declared observed variables, which are vectors
This may also affect the other `load_`-files
Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.eu