Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -rcspline- available on SSC


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   "statalist" <statalist@hsphsun2.harvard.edu>
Subject   st: -rcspline- available on SSC
Date   Wed, 24 Oct 2007 18:27:12 +0100

Thanks to the busy Bostonian Kit Baum, a new -rcspline- package is now
downloadable from SSC. Stata 10 is required. Use -ssc- to install. 

-rcspline- was pre-announced as far back as 18 July 2007, when I said
what is below. -rcspline- is much, much less of a big deal than (say)
Patrick Royston's -mvrs- (on which use -search-), but I use it a lot to
look at bivariate relationships. 

I've recently updated the 12 programs in the -modeldiag- package
published in 2004. Where appropriate, commands now also have restricted
cubic spline options too, although as implied Stata 10 is needed for
those options to work. The update will be released through the SJ. 

Nick
n.j.cox@durham.ac.uk 

------------------------------------------- 18 July 2007 
[...] note that Stata 10 has added restricted cubic splines to 
-mkspline-, following some able advocacy from Bill Dupont and Frank 
Harrell. There hasn't been much publicity about this, but in my view
it is a very welcome addition.

The technique is nicely written up in Frank's book [Regression modelling
strategies, Springer, NY, 2001].

I have played around with several examples and written
a wrapper program -rcspline- that calls up -mkspline-,
generating the splines as temporary variables, runs the regression and 
then plots response, smoothed response, and predictor. Various options
allow tweaking of number and positions of knots, display of confidence
intervals, and so on. Only the tedious job of writing a help file
remains.

I have found that the default number and positions of knots usually
work very well. The result is quick and _much_ faster than -lowess-.
Also, the default of -lowess- can leave small blips and burps without
scientific or practical meaning.
Being able to get out confidence intervals is naturally a bonus too.
It is also easier to use than -lpoly-.


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index