joinpoint.relaxProp: Relaxing the proportionality assumption

View source: R/source_relaxProp.R

joinpoint.relaxPropR Documentation

Relaxing the proportionality assumption

Description

Fitting a joinpoint survival model by relaxing the proportionality assumption

Usage

joinpoint.relaxProp(data, subset, max.cutpoint=5,
       year="Year", interval="Interval", number.event="Died", 
       number.alive="Alive_at_Start", number.loss="Lost_to_Followup",
       expected.rate="Expected_Survival_Interval", 
       observed.rate="Observed_Survival_Interval", 
       model.form=NULL, maxnum.jp=0, 
       proj.year.num=5, op=list(), delLastIntvl=FALSE, add.data.cols=NULL)

Arguments

data

Data frame containing all variables in the model.

subset

A logical vector of length nrow(data), a character string or NULL to include a particular subset of data in the analysis. See Details and Examples.

max.cutpoint

A positive integer or NULL giving the number of cutpoints to consider. If NULL, then it will be set to the number of intervals minus one. The default is 5.

year

Column name of data giving the year or year code. This column must be numeric. The default is 'Year'.

interval

Column name of data giving the time interval elapsed from the starting time to the event time. This column must be numeric. The default is 'Interval'.

number.event

Column name of data giving the number of events or deaths. This column must be numeric. The default is 'Died'.

number.alive

Column name of data giving the number of subjects alive. This column must be numeric. The default is 'Alive_at_Start'.

number.loss

Column name of data giving the number of subjects lost to followup. This column must be numeric. The default is 'Lost_to_Followup'.

expected.rate

Column name of data giving the expected interval survival. This column must be numeric. The default is 'Expected_Survival_Interval'.

observed.rate

Column name of data giving the observed interval survival. This column must be numeric. The default is 'Observed_Survival_Interval'.

model.form

an object of class "formula": a symbolic description of covariates. Example: ~-1+age+as.factor(stage)

maxnum.jp

The maximum number of join points allowed. The default is zero, which is equivalent to a proportional hazard relative survival model.

proj.year.num

The number of projection years for use in the prediction step. Default value is 5 years, with a valid range of 0 to 30 years.

op

List of more options. Details —

  • numbetwn: integer value, number of skipped obs between joinpoints exclusive (not count for the joinpoints). Default is 2.

  • numfromstart: integer value, number of skipped obs from the first obs to joinpoints exclusive (not count for the joinpoint). Default is 3.

  • numtoend: integer value, number of skipped obs from the first obs to joinpoints exclusive (not count for the joinpoint). Default is 4.

delLastIntvl

an logical value indicating whether or not deleting records of last intervals of all years. The default is FALSE.

add.data.cols

Character vector of column names in data to add onto the returned data frames of results. Use "_ALL_" to add all columns and use NULL to not add any columns. The default is NULL.

Details

This function finds the optimal clustering of intervals (1, ..., I), where I is the number of intervals, such that there are at most two ordered clusters of the form (1, ..., j) and (j+1, ..., I). For each ordered cluster, a model is fit and the BIC is computed. The algorithm is as follows:
1. Fit the (unconditional) joinpoint survival model on intervals (1, ..., I) and compute the BIC and call it BIC-0.
2. For each cutpoint j, j = 1, ..., max.cutpoint, fit the (unconditional) joinpoint survival model on intervals (1, ..., j) and fit the conditional joinpoint survival model on intervals (j+1, ..., I). Compute the BIC and label it BIC-j.
3. The optimal clustering is the one with minimum BIC = min(BIC-0, BIC-1, ...)

Value

A list of class "jp.relaxProp" with the following objects:

fit.info

A data frame containing fitting information from the joinpoint and conditional joinpoint models at each step of the algorithm. The data frame contains the joinpoints and number of joinpoints.

predicted

The fitted relative survival rates

fullpredicted

The full output matrix, with all year/interval combinations and projections

fit.uncond

The fitted model from the (unconditional) joinpoint model corresponding to the best fit.

fit.cond

The fitted model from the conditional joinpoint model corresponding to the best fit.

all.results

A list containing all the results at each cutpoint. Each element of all.results is a list containing cutpoint, fit.cond, and fit.uncond.

References

Yu, B., Huang, L., Tiwari, R. C., Feuer, E. J. and Johnson, K. A. (2009), Modeling population-based cancer survival trends by using join point models for grouped survival data. Journal of the Royal Statistical Society: Series A, 172, 405-425.

See Also

joinpoint, joinpoint.cond

Examples

#Load the provided SEER 18 breast cancer example data.
data("breast.example", package="JPSurv")
 
# Subset of observations to use
subset <- "Age_groups == '00-49' & Breast_stage == 'Localized'"
fit    <- joinpoint.relaxProp(breast.example, subset, max.cutpoint=2,
                              year="Year_of_diagnosis_1975")

JPSurv documentation built on June 8, 2025, 12:11 p.m.