Releases: wenjie2wang/splines2
Releases · wenjie2wang/splines2
splines2 0.5.4
Minor changes
- Suppressed the warning message for data outside boundary from the
plot()methods.
Bug fixes
- Fixed the implementation of natural cubic splines with one internal knot: issue 18.
splines2 0.5.3
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
New features
- Added a new argument named
coefto theplot()method forsplines2objects, 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
Minor changes
- Fixed broken
@docType packagedocumentation.
splines2 0.5.0
New features
- Added a new function named
nsk()for natural cubic spline basis functions following the functionsurvival::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 returnedsplines2object. - Added a new argument named
periodictobSpline()for periodic B-splines and a new class namedPeriodicBSplineto the Rcpp interface: issue 19. - Added a new argument named
coefto thepredict()methods to compute the responding spline function and made it possible to obtain the derivatives or update spline basis functions by passing...to theupdate()methods. - Added a new argument named
trimtonaturalSpline()to set the default boundary knots after trimming a fraction of observations. - Added a new argument named
warn.outsideand a package option namedsplines2.warn.outsideto specify if a warning should be thrown out for B-splines, etc. when anyxis 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
Hto 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 bynaturalSpline()/nsp()ornsk()).
Major changes
- Adjusted the class order of the returned objects.
- Adjusted the default placement of the internal knots from the specified
dfto be equidistant if the internal knots resulted from quantiles are problematic. A warning will be thrown out in that case.
splines2 0.4.8
Bug fixes
- Fixed the Rcpp interface of
PeriodicMSplineso that a simple knot sequence can be specified throughset_knot_sequence: issue 18.
splines2 0.4.7
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
New features
- Added
update()methods to produce new spline basis functions based on the
given object with specified updates in terms ofdegreeandknots, etc.
Minor changes
- Appended a new class named
splines2to the output matrices to simplify some
common S3 methods.
splines2 0.4.5
Minor changes
- Improved the computational efficiency of finding the knot intervals for
x
(by replacing the naive binary search implementation withstd::upper_bound
andstd::distance).
splines2 0.4.4
New features
- Added the
makepredictcall()methods for all available spline basis functions
to helpmodel.frame.default()create the right matrices when predicting from
models with terms such asbSpline(), etc. Thanks Zheyuan Li for suggesting
this feature. - Added arguments
derivsandintegaltobSpline()for consistency with
mSpline()andbernsteinPoly(), 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 forcSplineobjects whenscale = FALSE.