Releases: wenjie2wang/splines2
Releases · wenjie2wang/splines2
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
coef
to theplot()
method forsplines2
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
Minor changes
- Fixed broken
@docType package
documentation.
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 returnedsplines2
object. - Added a new argument named
periodic
tobSpline()
for periodic B-splines and a new class namedPeriodicBSpline
to the Rcpp interface: issue 19. - Added a new argument named
coef
to 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
trim
tonaturalSpline()
to set the default boundary knots after trimming a fraction of observations. - Added a new argument named
warn.outside
and a package option namedsplines2.warn.outside
to specify if a warning should be thrown out for B-splines, etc. when anyx
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 bynaturalSpline()
/nsp()
ornsk()
).
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
Bug fixes
- Fixed the Rcpp interface of
PeriodicMSpline
so 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 ofdegree
andknots
, etc.
Minor changes
- Appended a new class named
splines2
to 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
derivs
andintegal
tobSpline()
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 forcSpline
objects whenscale = FALSE
.
splines2 0.4.3
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
andPeriodicMSpline
objects to the
C++ interface.
Minor changes
- Added testing examples for constructing spline basis functions via the C++
interface.