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.
|