[R] Restricted cubic spline function ERROR?: glm(Y~rcs(x,5))

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon May 2 18:05:26 CEST 2005


Jan Verbesselt wrote:
> Dear all,
> 
> Is the restricted cubic spline function working properly in the glm model?
> 
> We used glm(y~rcs(x,5), family=binomial) but it seems that for some
> theoretical reasons the rcs, restricted cubic spline function can not be
> fitted by a glm function. Is this correct?
> 
> 
> Regards,
> Jan
> 
> ((Originally, we used lrm(y~ rcs(x,5)) but we couldn't find how to derive
> the AIC value of the fitted model. Is there a solution?))

The fit object from lrm has all the information you need to easily 
compute AIC.  Type names(fit object) to see what's there.

If you really needed glm (which you don't), Design wants you to use glmD.



-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list