s-news
[Top] [All Lists]

coefficients of cubic splines

To: s-news@lists.biostat.wustl.edu
Subject: coefficients of cubic splines
From: "Abhilash Sreekumar Nair" <abhilash@iitb.ac.in>
Date: Sat, 27 Mar 2004 22:24:14 +0530 (IST)
Importance: Normal
In-reply-to: <Pine.LNX.4.44.0403270809230.11650-100000@gannet.stats>
References: <4064CA7A.1030100@blackmesacapital.com> <Pine.LNX.4.44.0403270809230.11650-100000@gannet.stats>
User-agent: SquirrelMail/1.4.2
Dear All,

I am using S-plus 6.0 for windows, I want to fit a natural cubic spline on
a dataset. I have used the following command:

fit.nif4<-lm(y ~ns(x,4)), (where 4 stands for the number of knots, please
do correct me if I am wrong.)

My problem is that as I go on increasing the knots the no. of coefficients
go on increasing, (sample results are presented below):

lm(formula = y ~ ns(x, 4))

Coefficients:
(Intercept)   ns(x, 4)1     ns(x, 4)2   ns(x, 4)3
-0.08108135   0.08057826   0.07411367   0.1566252

 ns(x, 4)4
 0.0940209

if the knots are specified as 5, there are 5 + 1 Intercept coefficients.

My Question: How to interpret these coefficients. In a spline fit there
have to be a different polynomial fit for different knots. therefore how
to interpret these coefficients.

Thanking you in anticipation,

Abhilash S Nair,
Research Scholar,
Indian Institute of Technology Bombay
Mumbai
India.



<Prev in Thread] Current Thread [Next in Thread>