[R] how to interpret coefficients for a natural spline smooth function in a GLM
David Winsemius
dwinsemius at comcast.net
Mon Jun 15 18:17:49 CEST 2009
Plot the predictions; you can almost never interpret the coefficients
of a spline fit individually. They are not really independent or
separately interpretable.
Is this homework?
--
David
On Jun 15, 2009, at 10:19 AM, ltracy wrote:
>
> Hello-
>
> I am trying to model infections counts over 120 months using a GLM
> in R.
> The model is simple really including a factor variable for year (10
> yrs in
> total) and another variable consisting of a natural spline function
> for time
> in months.
>
> My code for the GLM is as follows:
> model1<-glm(ALL_COUNT~factor(FY)+ns(1:120, 10), offset=log(TOTAL_PTS),
> family=poisson, data=TS1)
>
> The summary output pertaining to the smooth function consists of 10
> coefficients for each df in the model. Here are the coefficients:
>
> ns(1:120, 10)1 -0.72438 0.32773 -2.210 0.027084 *
> ns(1:120, 10)2 -1.19097 0.37492 -3.177 0.001490 **
> ns(1:120, 10)3 -1.40250 0.42366 -3.310 0.000931 ***
> ns(1:120, 10)4 -0.82722 0.47459 -1.743 0.081334 .
> ns(1:120, 10)5 -0.46139 0.49657 -0.929 0.352812
> ns(1:120, 10)6 -0.44892 0.51909 -0.865 0.387137
> ns(1:120, 10)7 -0.53060 0.54783 -0.969 0.332778
> ns(1:120, 10)8 -0.25699 0.55582 -0.462 0.643814
> ns(1:120, 10)9 -0.74091 0.63899 -1.160 0.246249
> ns(1:120, 10)10 0.41142 0.56317 0.731 0.465054
>
> What is still unclear to me is what these 10 coefficients from the
> natural
> spline represent.
>
> Thanks in advace-
>
>
>
>
> --
> View this message in context: http://www.nabble.com/how-to-interpret-coefficients-for-a-natural-spline-smooth-function-in-a-GLM-tp24035485p24035485.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.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list