An S-Plus function to calculate relative risks and adjusted means for regression models using natural splines

  • Authors:
  • Jiguo Cao;Marie-France Valois;Mark S. Goldberg

  • Affiliations:
  • Department of Mathematics and Statistics, McGill University, Montreal, Quebec H3A 1A1, Canada;Division of Clinical Epidemiology, Department of Medicine, McGill University Health Center-RVH, 687 Pine Avenue West, R4.29, Montreal, Quebec H3A 1A1, Canada;Division of Clinical Epidemiology, Department of Medicine, McGill University Health Center-RVH, 687 Pine Avenue West, R4.29, Montreal, Quebec H3A 1A1, Canada

  • Venue:
  • Computer Methods and Programs in Biomedicine
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.