Skip to content

Releases: wenjie2wang/splines2

splines2 0.5.3

08 Jul 12:18
4edfefa
Compare
Choose a tag to compare

Minor changes

  • Incorporated changes suggested by GCC compiler for C++20 to suppress the warning: warning: template-id not allowed for constructor in C++20.

splines2 0.5.2

09 May 16:05
830be52
Compare
Choose a tag to compare

New features

  • Added a new argument named coef to the plot() method for splines2 objects, allowing visualization of the fitted spline function with a given coefficient vector.

Minor changes

  • Made the error message more clear for duplicated internal knots.

splines2 0.5.1

20 Aug 01:28
8a94561
Compare
Choose a tag to compare

Minor changes

  • Fixed broken @docType package documentation.

splines2 0.5.0

11 Jun 20:16
9286821
Compare
Choose a tag to compare

New features

  • Added a new function named nsk() for natural cubic spline basis functions following the function survival::nsk() (of survival package version 3.2-8).
  • Added plot() methods to quickly visualize the spline basis functions.
  • Added $ method to extract an attribute of the returned splines2 object.
  • Added a new argument named periodic to bSpline() for periodic B-splines and a new class named PeriodicBSpline to the Rcpp interface: issue 19.
  • Added a new argument named coef to the predict() methods to compute the responding spline function and made it possible to obtain the derivatives or update spline basis functions by passing ... to the update() methods.
  • Added a new argument named trim to naturalSpline() to set the default boundary knots after trimming a fraction of observations.
  • Added a new argument named warn.outside and a package option named splines2.warn.outside to specify if a warning should be thrown out for B-splines, etc. when any x is placed outside the boundary.
  • Added the following function aliases to encourage the use in a model formula:
    • bsp() = bSpline()
    • msp() = mSpline()
    • isp() = iSpline()
    • csp() = cSpline()
    • nsp() = naturalSpline()
    • bpoly() = bernsteinPoly()
  • Added a matrix named H to the attribution of objects for natural cubic splines so that users may transform cubic B-splines (from other software/packages) to the natural cubic splines (returned by naturalSpline()/nsp() or nsk()).

Major changes

  • Adjusted the class order of the returned objects.
  • Adjusted the default placement of the internal knots from the specified df to be equidistant if the internal knots resulted from quantiles are problematic. A warning will be thrown out in that case.

splines2 0.4.8

26 Mar 20:59
cb7bfd8
Compare
Choose a tag to compare

Bug fixes

  • Fixed the Rcpp interface of PeriodicMSpline so that a simple knot sequence can be specified through set_knot_sequence: issue 18.

splines2 0.4.7

14 Jan 15:42
7680210
Compare
Choose a tag to compare

Minor changes

  • Adjusted the column arrangement of the natural cubic spline basis matrix so that it matches the equations given in the JDS paper:
    issue 17.

splines2 0.4.6

15 Aug 13:10
8601a4c
Compare
Choose a tag to compare

New features

  • Added update() methods to produce new spline basis functions based on the
    given object with specified updates in terms of degree and knots, etc.

Minor changes

  • Appended a new class named splines2 to the output matrices to simplify some
    common S3 methods.

splines2 0.4.5

19 Sep 16:48
c516cf0
Compare
Choose a tag to compare

Minor changes

  • Improved the computational efficiency of finding the knot intervals for x
    (by replacing the naive binary search implementation with std::upper_bound
    and std::distance).

splines2 0.4.4

16 Aug 12:04
09dd651
Compare
Choose a tag to compare

New features

  • Added the makepredictcall() methods for all available spline basis functions
    to help model.frame.default() create the right matrices when predicting from
    models with terms such as bSpline(), etc. Thanks Zheyuan Li for suggesting
    this feature.
  • Added arguments derivs and integal to bSpline() for consistency with
    mSpline() and bernsteinPoly(), etc.

Minor changes

  • Made the internal checking procedure more strict to throw an error if any
    internal knots are placed at or outside boundary:
    issue 5.

Bug fixes

  • Fixed the predict() method for cSpline objects when scale = FALSE.

splines2 0.4.3

21 Apr 12:35
c7bff8a
Compare
Choose a tag to compare

New features

  • Enabled extended knot sequence that allows multiplicity of internal knots for
    B-splines, M-splines, I-splines, and C-splines in the C++ interface.
  • Added type conversion to BernsteinPoly and PeriodicMSpline objects to the
    C++ interface.

Minor changes

  • Added testing examples for constructing spline basis functions via the C++
    interface.