[R] spline regression

Greg Snow Greg.Snow at imail.org
Sat Jul 25 19:16:25 CEST 2009


Natural splines (nsin the splines package rcs in the Hmisc or Design package) are linear outside of the range of the knots.  You could use those and just specify the knots to be within the portion that you want to allow to be non-linear.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of serbring
> Sent: Saturday, July 25, 2009 3:29 AM
> To: r-help at r-project.org
> Subject: [R] spline regression
> 
> 
> i have a trend that it is linear at first and then it has a particular
> trend.
> There is a mathematic model, but it describes only the linear part. I
> have
> tried to use a spline regressione, but i have obtained a particular fit
> trend that it is unreal. Can i create a spline regression that it is of
> a
> unitary degree only at first?
> --
> View this message in context: http://www.nabble.com/spline-regression-
> tp24656274p24656274.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list