Related Experiment Video
Updated: Jul 20, 2026

An R-Based Landscape Validation of a Competing Risk Model
Published on: September 16, 2022
An S-Plus function to calculate relative risks and adjusted means for regression models using natural splines.
Jiguo Cao1, Marie-France Valois, Mark S Goldberg
1Department of Mathematics and Statistics, McGill University, Montreal, Quebec H3A 1A1, Canada.
This study introduces an S-Plus function for generalized linear models using natural cubic splines. It calculates relative risks, log relative risks, mean percent change, and adjusted mean differences, aiding in statistical analysis and visualization.
Area of Science:
- Statistics
- Biostatistics
- Computational Statistics
Background:
- Generalized linear models (GLMs) are widely used for analyzing various data types.
- Modeling complex relationships between predictors and outcomes often requires flexible approaches like splines.
- Existing methods may lack integrated tools for calculating and visualizing specific risk and change metrics.
Purpose of the Study:
- To develop an S-Plus function for calculating key statistical measures in GLMs with natural cubic splines.
- To provide tools for estimating relative risks (RR), log relative risks (logRR), mean percent change (MPC), and adjusted mean differences (MD).
- To enable publication-quality graphical representation of these measures against a reference value.
Main Methods:
- Implementation of an S-Plus function utilizing natural cubic spline basis functions.
- Direct use of estimated coefficients and the fitted correlation matrix for calculations.
- Accommodating various degrees of freedom for the natural splines.
- Generation of plots with confidence limits for estimated quantities.
Main Results:
- The function successfully calculates RR, logRR, MPC (logarithmic link), and MD (identity link).
- Graphical outputs display these statistics relative to a user-defined reference.
- The method accommodates flexible modeling of predictor effects using splines.
- Specific values can be computed for comparison across different independent variable values.
Conclusions:
- The developed S-Plus function offers a comprehensive tool for analyzing GLMs with natural cubic splines.
- It facilitates the interpretation of model results through key statistical metrics and visualizations.
- This tool enhances the ability to assess risk and change in statistical modeling contexts.
Related Concept Videos
Residuals and Least-Squares Property
If the observed data point lies above the line, the residual is positive, and the line underestimates the actual data value for y. If the observed data point lies below the line, the residual is negative, and the line overestimates the actual data value for y.
The process of fitting the best-fit...
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...
Assumptions of Survival Analysis
Relative Risk
Introduction To Survival Analysis
The primary goal of survival analysis is to estimate survival time—the time until a...
Regression Analysis
In regression analysis, a regression equation is determined based on the line of best fit– a line that best fits the data points plotted in a graph. This line is also called the regression line. The algebraic equation for the regression line is called the regression equation. It is represented as:
