An S-Plus function to calculate relative risks and adjusted means for regression models using natural splines.
We provide for generalized linear regression models that use natural cubic splines to model predictors an S-Plus function to calculate relative risks (RR), log relative risk (logRR), mean percent change (MPC) for continuous covariates modeled using a logarithmic link as well as adjusted means differences (MD) for the identity link. The function makes explicit use of the natural spline basis functions, the estimated coefficients for each natural spline basis function, and the fitted correlation matrix for the estimated coefficients and can thus accommodate any number of degrees of freedom. The main function produces a publication-quality graph of all of these quantities as compared to a user-specified reference value as well as the associated confidence limits. In another function, specific values of these statistics comparing a vector of values of the independent variable to the reference value can be calculated rather than plotted.
Cao
Jiguo
J
Department of Mathematics and Statistics, McGill University, Montreal, Quebec H3A 1A1, Canada.
Valois
Marie-France
MF
Goldberg
Mark S
MS
D012044:Regression Analysis; D012306:Risk