Skip to content

Releases: helske/KFAS

KFAS 1.2.0 released on CRAN

31 Jan 13:41
Compare
Choose a tag to compare

New version of KFAS available on CRAN. Contains few bigger bug fixes, several small ones, and couple new features and performance boosts. Vignette contains now more examples and comparison to other packages with similar goals.

Full changelog:

  • 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.
  • 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.
  • 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.
  • is.SSModel: Tweaked code for performance.
  • is.SSmodel: Corrected bug relating for check of tv attribute.

KFAS 1.1.0 released on CRAN

18 Apr 07:24
Compare
Choose a tag to compare

Corrected bugs, added some functionality, and tweaked codes for performance and readability.

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).

KFAS version 1.0.4 for CRAN

27 May 20:26
Compare
Choose a tag to compare

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.