Thanks once again to Kit Baum, new versions of the packages bspline and polyspline are now available for download from SSC. In Stata, use the ssc command to do this, or adoupdate if you already have old versions of these packages.
The packages bspline and polyspline are described as below on my website. In the new versions, the modules frencurv and flexcurv of the bspline package, and the polyspline package, all compute a variable characteristic basestat for the generated spline variables, with value 1 if the corresponding spline is a base-value spline (evaluated to 0), and to 0 otherwise. And polyspline now informs the user if the bspline package (on which it depends) is not installed.
Best wishes
Roger
----------------------------------------------------------------------------
package bspline from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------
TITLE
bspline: Create a basis of B-splines or reference splines
DESCRIPTION/AUTHOR(S)
The bspline package contains 3 commands, bspline, frencurv
and flexcurv. bspline generates a basis of B-splines in the
X-variate based on a list of knots, for use in the design
matrix of a regression model. frencurv generates a basis of
reference splines, for use in the design matrix of a
regression model, with the property that the parameters
fitted will be values of the spline at a list of reference
points. flexcurv is an easy-to-use version of frencurv, and
generates reference splines with regularly-spaced knots, or
with knots interpolated between the reference points.
frencurv and flexcurv have the additional option of
generating an incomplete basis of reference splines, which
can be completed by the addition of the standard constant
variable used in regression models. The splines are either
given the names in the newvarlist (if present), or (more
usually) generated as a list of numbered variables, prefixed
by the generate() option. Usually (but not always), the
regression command is called using the noconst option.
Author: Roger Newson
Distribution-date: 17 July 2022
Stata-version: 16
INSTALLATION FILES (click here to install)
bspline.ado
bspline.sthlp
frencurv.ado
frencurv.sthlp
flexcurv.ado
flexcurv.sthlp
ANCILLARY FILES (click here to get)
bspline.pdf
----------------------------------------------------------------------------
(click here to return to the previous screen)
----------------------------------------------------------------------------
package polyspline from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------
TITLE
polyspline: Generate sensible bases for polynomials and other splines
DESCRIPTION/AUTHOR(S)
The polyspline package inputs an X-variable and a list of
reference points on the X-axis, and generates a basis of
reference splines (one per reference point) for a polynomial
or other unrestricted spline. This basis can be included in
the list of covariates of a regression model. The estimated
parameters will then be values of the spline at the reference
points, or differences between values of the spline at the
reference points and the value of the spline at a base
reference point. polyspline is an easy-to-use front end for
the SSC package bspline, which must be installed for
polyspline to work.
Author: Roger Newson
Distribution-date: 17july2022
Stata-version: 16
INSTALLATION FILES (click here to install)
polyspline.ado
polyspline.sthlp
----------------------------------------------------------------------------
(click here to return to the previous screen)
The packages bspline and polyspline are described as below on my website. In the new versions, the modules frencurv and flexcurv of the bspline package, and the polyspline package, all compute a variable characteristic basestat for the generated spline variables, with value 1 if the corresponding spline is a base-value spline (evaluated to 0), and to 0 otherwise. And polyspline now informs the user if the bspline package (on which it depends) is not installed.
Best wishes
Roger
----------------------------------------------------------------------------
package bspline from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------
TITLE
bspline: Create a basis of B-splines or reference splines
DESCRIPTION/AUTHOR(S)
The bspline package contains 3 commands, bspline, frencurv
and flexcurv. bspline generates a basis of B-splines in the
X-variate based on a list of knots, for use in the design
matrix of a regression model. frencurv generates a basis of
reference splines, for use in the design matrix of a
regression model, with the property that the parameters
fitted will be values of the spline at a list of reference
points. flexcurv is an easy-to-use version of frencurv, and
generates reference splines with regularly-spaced knots, or
with knots interpolated between the reference points.
frencurv and flexcurv have the additional option of
generating an incomplete basis of reference splines, which
can be completed by the addition of the standard constant
variable used in regression models. The splines are either
given the names in the newvarlist (if present), or (more
usually) generated as a list of numbered variables, prefixed
by the generate() option. Usually (but not always), the
regression command is called using the noconst option.
Author: Roger Newson
Distribution-date: 17 July 2022
Stata-version: 16
INSTALLATION FILES (click here to install)
bspline.ado
bspline.sthlp
frencurv.ado
frencurv.sthlp
flexcurv.ado
flexcurv.sthlp
ANCILLARY FILES (click here to get)
bspline.pdf
----------------------------------------------------------------------------
(click here to return to the previous screen)
----------------------------------------------------------------------------
package polyspline from http://www.rogernewsonresources.org.uk/stata16
----------------------------------------------------------------------------
TITLE
polyspline: Generate sensible bases for polynomials and other splines
DESCRIPTION/AUTHOR(S)
The polyspline package inputs an X-variable and a list of
reference points on the X-axis, and generates a basis of
reference splines (one per reference point) for a polynomial
or other unrestricted spline. This basis can be included in
the list of covariates of a regression model. The estimated
parameters will then be values of the spline at the reference
points, or differences between values of the spline at the
reference points and the value of the spline at a base
reference point. polyspline is an easy-to-use front end for
the SSC package bspline, which must be installed for
polyspline to work.
Author: Roger Newson
Distribution-date: 17july2022
Stata-version: 16
INSTALLATION FILES (click here to install)
polyspline.ado
polyspline.sthlp
----------------------------------------------------------------------------
(click here to return to the previous screen)
