Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: New version of -bspline- on SSC


From   Roger Newson <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: New version of -bspline- on SSC
Date   Thu, 14 Oct 2010 21:51:04 +0100

Thanks as always to Kit Baum, a new version of the -bspline- package is now available for download from SSC. In Stata, use the -ssc- command to do this, or -adoupdate- if you already have an old version of -bspline-.

The -bspline- package is described as below on my website. The new version adds a new module -flexcurv-, which is an easy-to-use version of -frencurv-, and generates evenly-spaced knots automatically. The user can therefore type, in the -auto- data,

flexcurv, xvar(weight) refpts(1760(770)4840) gen(cs) power(3)
describe cs*
regress mpg cs*, robust noconst

and fit a cubic spline model of -mpg- with respect to -weight-, whose parameters are simply the values of -mpg- at the weights 170(770)4840.

I have also added a new option -omit(#)- to -flexcurv- and -frencurv-. Therefore, the user can alternatively type

flexcurv, xvar(weight) refpts(1760(770)4840) omit(1760) gen(ics) power(3)
describe ics*
regress mpg ics*, robust

and fit the same cubic spline model, with a parameter -_cons- equal to the value of the spline for -mpg- at a baseline weight of 1760 US pounds, and parameters -ics2- to -ics5-, equal to the difference between values of the spline at the non-baseline weights of 2530, 3300, 4070 and 4840 US pounds and the value of the spline at the baseline weight of 1760 US pounds. The -flexcurv- command is therefore a bit like a version of -xi- for continuous variables.

Best wishes

Roger


--
Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

Opinions expressed are those of the author, not of the institution.

-----------------------------------------------------------------------------
package bspline from http://www.imperial.ac.uk/nhli/r.newson/stata10
-----------------------------------------------------------------------------

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 equally-spaced knots.
      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.
      Full documentation of the program (including Methods and
      Formulas) can be found in the ancillary file bspline.pdf,
      which can be viewed using the Adobe Acrobat Reader.

      Author: Roger Newson
      Distribution-date: 11 October 2010
      Stata-version: 10


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)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index