-
Notifications
You must be signed in to change notification settings - Fork 17
/
ChangeLog
363 lines (328 loc) · 21.6 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
Changes from version 1.5.0 to 1.5.1
* Added explicit alias for KFAS-package due to changes in roxygen2.
Changes from version 1.4.6 to 1.5.0
* Added a `confint` method for `KFS` output.
* Corrected the return value of maxiter in case the Gaussian approximation
fails. Now returns the iteration number where the failure occured instead
of maximum number based on the call.
* Improved documentation on the standardarized residuals and added new
examples.
* Added two new examples for custom models.
Changes from version 1.4.5 to 1.4.6
* Changed the Fortran file extensions from .f95 to .f90 for better portability.
* Added an example of more complex model estimation with fitSSM.
Changes from version 1.4.4 to 1.4.5
* Added an argument damping to `SSMcycle` for defining damping factor.
* Set F to NA if Z contains NA's. KFS earlier set F to zero in these cases.
* Added a reminder to cite the JSS paper instead of only the package itself.
* Changed the RNG behaviour of logLik method: Previously set.seed call in case of
importance sampling based log-likelihood computation altered the
global RNG state, but now old state is restored on exit.
* Fixed typo in the state and observation intercept example in `?KFAS`.
Changes from version 1.4.2 to 1.4.4
* Fixed declarations of Fortran functions affected by the addition of 'H_tol'
(see previous version).
* Added argument 'transform_tol' tol to logLik, KFS, and transformSSM functions, which
can be used to adjust the default tolerance parameter of LDL decomposition in case of
numerical issues on M1 Mac.
* Fixed uninitialized memory issues from 1.4.2.
Changes from version 1.4.1 to 1.4.2
* Added some examples.
* Added an additional check for the convergence of the Gaussian approximation,
which checks whether the largest variance term H of the approximating model is overly large,
suggesting a convergence to a nonidentifiable case with zero signal-to-noise ratio.
The default check is very generous max(H) > 1e15. This can be changed using argument 'H_tol'
in logLik, approxSSM, importanceSSM, and KFS.
Changes from version 1.4.0 to 1.4.1
* Fixed internal approximation function declaration.
Changes from version 1.3.7-1 to 1.4.0
* The approximation algorithm for Gamma and negative binomial case was changed slightly.
New version is based on Taylor approximation, whereas old version was a slight modification of
this wrt the variances of the approximating model.
For simple GLM the difference is essentially observed (current) vs. expected (old)
information matrix, i.e. the state covariance matrix estimates can differ slightly.
You can revert back to old version by using the argument 'expected = TRUE' where applicable.
* Kalman filter and smoothing now performs some intermediate rounding to zero
in obvious negative rounding errors of covariance matrices. Symmetry of Vt is now also forced.
These should help in some numerically unstable cases and have no effect in typical models.
* Fixed the definition of theta of the Poisson distribution case in ?KFAS help page.
Changes from version 1.3.7 to 1.3.7-1
* Minor fixes in examples of fitSSM and vignette. Thanks for Max Thilo for spotting these.
Changes from version 1.3.6 to 1.3.7
* Ptt is symmetric as it should, previously the strictly lower
triangular part was wrong. Thanks for jye1999 for catching the bug.
Changes from version 1.3.5 to 1.3.6:
* Fixed a bug in state estimation when transitioning from diffuse
filtering to non-diffuse phase in case of multivariate series.
Thanks to Hiroyuki Kawakatsu for noticing the issue.
* Fixed some internal function declarations.
Changes from version 1.3.4 to 1.3.5:
* predict.SSModel: Previous fix from 1.3.4 didn't actually work,
now fixed for real. Thanks for jhal324 for the fix.
* Changed some of the tests due to the changes in sample function.
Changes from version 1.3.3 to 1.3.4:
* predict.SSModel: Fixed bug from previous version which caused Gaussian predictions to
fail if argument 'filtered' was TRUE.
Changes from version 1.3.2 to 1.3.3:
* KFS: Fixed a bug in KFS which caused the returned Ptt to be wrong in most cases.
* Added NAOK = TRUE for predict method so partial predictions should work in case of NA values in Z (and y).
* KFS: Added argument return_model to KFS, setting this to FALSE can save some memory.
Changes from version 1.3.1 to 1.3.2:
* rstandard: Fixed a small bug in standardized residuals relating to numerically zero values.
* rstandard: The standardized residual and non-standardized residual for zero-valued case
are now equal (0, previously rstandard returned NA).
* SSMseasonal: Fixed a bug relating to argument harmonics, which returned wrong harmonics
in some cases. Thanks Noobivsho on Github.
* Added Matrix package to Suggests as it is used in the vignette.
Changes from version 1.3.0 to 1.3.1:
* Fixed a bug in contemporous filtering, now Ptt is symmetric as it should.
Changes from version 1.2.10 to 1.3.0:
* KFS now returns also filtered state estimates for Gaussian models
(previously only one-step ahead predictions were given).
* Added a zerotol argument with default value of zero to standardized residuals.
This can be used to guard numerical issues in residual computations.
The previous hard-coded value of sqrt(machine epsilon) was too tight in
some settings.
Changes from version 1.2.9 to 1.2.10:
* Fixed a bug in rstandard with state disturbance residuals caused by
dimension mismatch between state and disturbance variables.
Changes from version 1.2.8 to 1.2.9:
* Fixed a bug in model building funcitons which caused P1inf to become zero
if P1 contained even a single nonzero value.
* R codes are now byte-compiled.
Changes from version 1.2.7 to 1.2.8:
* Updated CITATION to refer the JSS paper.
Changes from version 1.2.6 to 1.2.7:
* logLik.SSModel: Changed the tolerance of degeneracy check (are all
variance parameters of the model zero?) from .Machine$double.eps to
.Machine$double.eps^0.75 in order to make optimization more robust to poor
initial values.
Changes from version 1.2.5 to 1.2.6:
* SSMseasonal: New experimental argument harmonics for determing what
subharmonics are used in trigonometric seasonal components.
* rstandard.KFS: Rewrote some of the codes for standardized residuals,
resulting slightly faster and more robust computation.
* rstandard.KFS: Corrected bug (which resulted an error) in state residuals
due to the careless use of diagonal extraction via diag function.
* rstandard.KFS: Correct names for standardized state residuals.
* rstandard.KFS and residuals.KFS: Deviance residuals are now defunct.
* ldl: Now checks if the argument is 1x1 matrix or scalar and returns
appropriate result, i.e. original value as 1x1 matrix.
* is.SSModel: Now checks that all the relevant model components are double
type in order to avoid problems in Fortran side.
* Added example to mvInnovations function for computing the filtered
estimates from the one-step-ahead predictions computed by KFS.
Changes from version 1.2.4 to 1.2.5:
* Modified the zero-tolerance in filtering algorithms for better
numerical behaviour in models where Z contains very small or large values.
* Added more examples.
* New citation info for arXiv.
Changes from version 1.2.3 to 1.2.4:
* Corrected a bug in marginal likelihood computation which resulted failure in
multivariate Gaussian models.
Changes from version 1.2.2 to 1.2.3:
* is.SSModel now test that for the diffuse states there are no non-zero
elements on the corresponding diagonal elements of P1.
* Removed unused variables in simulation algorithms.
* Exracting single state with coef.KFS caused error do to dimension reduction,
now fixed.
* Added argument state_names to auxiliary functions for user-defined state
names.
* Added new function rename_states for renaming the states of SSModel object.
Changes from version 1.2.1 to 1.2.2:
* importanceSSM: Calling importanceSSM with fully Gaussian model now produces
an error.
* simulateSSM: Corrected a bug from version 1.2.1 which produced an error
with type = "observations".
* simulateSSM: Corrected a bug from version 1.2.1 relating to unconditional
simulation which caused the function to produce spurious results when some
of the observations of the model were not missing.
* fitSSM: The argument names of the updatefn function can now be arbitrary,
only the ordering (parameters, model, additional arguments) matters.
* predict.SSModel: Corrected a bug in prediction interval
computation for non-Gaussian models where wrong values of parameter u were
used if timespan of prediction was other than the whole time interval 1 to n.
* some of the tests were rewritten in order to be compatible with
new version of testthat.
Changes from version 1.2.0 to 1.2.1:
* SSMtrend: Now works with cases where degree > 3. Previously naming of states
produced an error.
* Added names to tv attribute of SSModel.
* Updated vignette.
* simulateSSM: Unconditional simulation smoother now does not fix the first
state except for the elements which were defined via exact diffuse
initialization.
* simulateSSM: Corrected bug related to uninitialized variables. As a result,
simulation smoother for epsilon disturbances now work properly for missing
time points.
* Adjusted tolerance checks for nonzero non-diagonal elements in H.
* ldl and transformSSM: Adjusted default tolerances for LDL decomposition.
Previously the tolerance was often set smaller than machine epsilon.
Changes from version 1.1.3 to 1.2.0:
* signal: Corrected case of extracting filtered mean when it was missing from
the input.
* signal: Corrected extraction of smoothed mean variance which previously
returned NULL.
* predict.SSModel: corrected tsp attribute for one step ahead prediction.
* predict.SSModel: Added argument filtered. When TRUE, produces (in sample)
predictions based on filtered estimates.
* fitSSM: Additional arguments to updatefn are now passed via optional argument
list update_args in order to avoid possible conflicts between the updatefn
and optim functions.
* fitSSM: For non-Gaussian models the initial values for linear predictor are
precalculated and passed to logLik in optimization, as there is no need to
compute them again in each iteration.
* fitSSM: By default, fitSSM does not anymore run the is.SSModel as checkfn in
each iteration, now only invalid values in system matrices are checked.
* Added example for boat race data.
* Added examples to multiple functions.
* coef.KFS: Added argument last which extracts only the last time point.
* Subset methods for SSModel and deviance.KFS are now defunct.
* Extraction and assignment methods of SSModel object now work also with numeric
values (but improper assignment can cause the result in non-valid SSModel object).
* Added default value (1) for n in auxiliary model building functions.
* Added coef and fitted methods for SSModel object.
* Added diagnostic plot method for SSModel object.
* SSMseasonal: Corrected a bug where the matrix R was not defined properly for
multivariate models causing erronenous covariance matrix RQR for Q!=0.
* Allow nonzero a1 for diffuse elements. Mainly useful for plotting purposes as it does not affect likelihood etc.
Changes from version 1.1.2 to 1.1.3 (not public):
* is.SSModel: Tweaked code for performance.
* is.SSmodel: Corrected bug relating for check of tv attribute.
* predict.SSModel: Tweaked code for performance.
* predict.SSmodel: Corrected a bug relating to modifying tv attribute of combined model where
system matrices on original and new model were both time invariant but not identical.
Changes from version 1.1.1 to 1.1.2:
* Exported function mvInnovations for computing multivariate versions of v, F and Finf.
* SSMregression: If Z contains only intercept or other time-invariant variables only, Z is reduced to time-invariant.
Changes from version 1.1.0 to 1.1.1:
* Corrected dimensionality checks of system matrices in auxiliary functions. Previously SSMtrend
threw an error with time varying Q for univariate series.
* Corrected memory leak in artransform which sometimes caused R to crash.
* Added tests and example regarding ARIMA models.
Changes from version 1.0.4-1 to 1.1.0:
* Added state types level and slope for easier extraction of states in multiple functions.
* coef.KFS: Added argument states for partial state vector extraction.
* simulateSSM: Corrected a bug which gave wrong variances for epsilon disturbances.
* simulateSSM: Corrected a bug which gave wrong variances for the initial states.
* rstandard.KFS: Added argument standardization_type which defines whether cholesky or marginal standardization is used.
* is.SSModel: Tweaked checks for faster performance for time varying models, added check for P1inf.
* fitSSM: Function now allows fixed time varying covariance matrices.
* fitSSM: check.model is set to FALSE when calling logLik.SSModel in all cases. see ?fitSSM for details.
* predict.SSModel: Corrected bug which caused partial signal prediction to fail.
* predict.SSModel: Corrected bug which caused prediction of non-Gaussian models with time varying u to fail.
* predict.SSModel: Method now correctly uses original times of the model object for the start and
end times of the predictions.
* approxSSM and related functions: Changed the converge criterion for approximating algorithm.
Previous criterion was missing one term which caused poor (or non-) converge in some cases with non-diffuse states.
* approxSSM and related functions: Added a line search as part of approximating algorithm.
This improves the converge of the algorithm especially in case of poor initial values.
* logLik.SSModel: Changed constant on Gaussian log-likelihood computation so now adding meaningless predictor
improves diffuse likelihood like it should. In simple regression setting the change is from
n*log(2*pi) to (n-k)*log(2*pi) where k is the number of regression coefficients. See testLM.R in
inst/tests for illustration.
* logLik.SSModel: Added argument 'marginal' for logLik method. If TRUE, additional,
often constant term suggested by Francke et al. (2010) is added to the diffuse log-likelihood.
See ?logLik.SSModel for details.
* logLik.SSModel: Changed default value for check.model to TRUE. For large models this adds small
overhead but prevents R from crashing with improperly (manually) modified model objects.
* SSModel: Added terms component for update method.
* SSModel: Corrected a bug relating to the environments which caused error in SSModel when
calling it inside a function with index argument defined in nonstandard way.
* SSModel: When using SSMregression without data argument, if variables are not found in the environment
of the formula, it now searches them from the data argument of SSModel and from the
environment of main formula. See examples in ?SSModel.
* Deprecated subset and 'subset<-' methods for SSModel as these were not in
line with the base R's generic function. Use '[.SSModel' instead. Generic
replacement via subset with 'subset<-' was also deprecated as it was only
used for SSModel object.
* rtandard.KFS and residuals.KFS: Deprecated deviance residuals.
* rtandard.KFS and residuals.KFS: Added support for recursive residuals for non-Gaussian models.
* rtandard.KFS: Corrected Pearson residual formulas for non-Gaussian models.
* is.SSModel: With na.check=TRUE, function now also checks for extreme values in H and Q (larger than 1e7).
* Signal filtering now return object t and not theta like it should (see Changes from Version 1.0.2 to 1.0.3).
Changes from version 1.0.4 to 1.0.4-1:
* Corrected R dependency from 3.0.0 to 3.1.0, which is needed for some package tests.
* Adjusted tolerance parameters in tests for better portability (test should now only fail in case
of clearly bogus answers).
Changes from version 1.0.3 to 1.0.4:
* Tweaked the underlying algorithms for increased numerical stability of filtering and smoothing
in KFS. Note that it is still possible that exact diffuse initialization fails due to to numerical
issues whereas traditional 'big value' approach works and vice versa.
* Corrected a bug in residuals.KFS which threw an error when computing recursive residuals without
diffuse initialization.
* Corrected output of LogLik method for non-Gaussian models: It now returns -Inf only when the
approximation algoritm failedcompletely (resulting NA), and issues only warning about
non-convergence in other cases.
* Added checks of degenerate model to LogLik method. If all elements in R, Q and H/u are zero, or
they contain any non-finite values, -Inf is returned.
* Fixed a bug in approximation algorithm which caused the approximation to fail for seemingly
random models.
* Fixed a bug in SSMcycle which caused error with common components.
* Fixed bug in SSMcycle which resulted erroneus system matrix T in all cases.
* Fixed a bug in SSMseasonal which caused error in SSModel when using common components.
* SSMseasonal with trigonometric seasonal now works properly when period is odd.
* Fixed a bug in coef.KFS which caused function to return smoothed states even with argument
filtered=TRUE if they were present in KFS object.
* Added argument "maxiter" to predict.SSModel and changed its default value in all functions to 50.
* Corrected a bug in function ldl which caused the decomposition of semidefinite matrices to fail
silently.
* Changed variable mu to m for mean filtering for non-Gaussian models without simulation just like
in other cases.
* Changed convergence criterion in Gaussian approximation algorithm from linear predictor based to
deviance based.
* Properly exported assigment using subset method. See ?subset.SSModel for details.
Changes from version 1.0.2 to 1.0.3:
* Changed default filtering option for Gaussian models back to "state" (was previously "none").
* Argument "invlink" in KFS is obsolete, proper argument is now "mean". For backwards compatibility,
"invlink" still works.
* Naming of output components of KFS were unified to follow the logic of state filtering and
smoothing: Now mean filtering returns an array m, and mean smoothing returns an array muhat,
signal filtering returns an array t, and signal smoothing returns an array thetahat.
Also, signal filtering and smoothing for Gaussian models returns m and muhat, not t and thetahat.
* Fixed several bugs concerning the linearization of Gamma and Negative binomial distribution,
which resulted false standard errors, among other problems.
* Corrected bug in computing standardization for pearson and deviance residuals,
and added separate method rstandard for standardized residuals.
* Added method hatvalues for computing hat values from KFS output.
* Added method fitted for extraction of fitted values from KFS output.
* Added method coef for extraction of fitted state values from KFS output.
* Added method deviance for computation of deviance from KFS output.
* Mean estimates for Poisson distribution now contains the effect of offset. Note that linear
predictor theta still does not contain offset term, i.e. mu=exp(theta)*offset.
* Fixed a bug in SSMregression. In earlier versions missing values were removed from model matrix
which caused error in constructing system matrices.
* Fixed a bug in SSMregression relating state names when type=="common".
* Fixed a bug in approxSSM which caused the approximation to fail if system matrix Z contained
missing values.
* LogLik.SSModel now produces error if linearization of non-Gaussian model did not converge.
* When using formula list in SSMregression, option to use list of datasets is now also supported.
* Naming convention for common regression coefficients with formula lists was changed.
Names for the states are now taken from the first dataset in data list.
* Fixed a bug in SSModel which caused error when formula contained interaction terms and custom parts.
* Broken SSMcycle with type="distinct" was fixed.
* Fixed a bug regarding simulateSSM with missing observations in diffuse phase, which caused
variances of simulated values to be much larger than expected.
Changes from version 1.0.0 to 1.0.2:
* Fixed a bug in SSMarima which caused function to fail if there was
no ar part and stationarity option was TRUE.
* Fixed a bug regarding the deviance residuals for Gaussian model.
* Fixed a bugs in logLik.SSModel and transformSSM relating to the model transformation.
* Fixed a bug in KFS signal smoothing regarding the multivariate model with
missing observations with time invariant Z and non-diagonal H.
* SSModel should now keep the time series attributes of the response variable.
* F is now set to 0 if F is smaller than the machine epsilon.
* transformSSM now keeps the proper dimnames of the system matrices.
* Changed the variable mu to muhat so it is similar to alphahat, thetahat etc.
* KFS now always returns the log-likelihood for the Gaussian models.
* Fixed a bug in residuals.KFS concerning the standardized deviance residuals.
* Fixed a bug in predict.SSModel concerning the interval computation for
non-Gaussian models without simulation.
* Fixed a bug in SSMregression and SSMcustom where a test of equality of
integer and double variables was done using function identical instead of ==.
* Fixed a bug in predict.SSModel regarding the standard error computations
without simulation for non-Gaussian models.
* Added filtering for non-Gaussian models.
* Changed the filtering and smoothing options on KFS.
* Added option to simulate from predictive distributions.
* Other minor bug typo fixes.