joinpoint.conditional: Fitting a join point conditional relative survival model from...

View source: R/source_cond.R

joinpoint.conditionalR Documentation

Fitting a join point conditional relative survival model from the unconditional model

Description

Fitting a joinpoint conditional relative survival model from the unconditional model

Usage

joinpoint.conditional(fit.uncond, start.intervals, end.intervals, njp=NULL)

Arguments

fit.uncond

Object returned from joinpoint.

start.intervals

Vector of integers giving the intervals to condition on.

end.intervals

Vector of integers giving the end number of intervals. This vector must have the same length and order as start.intervals with end.intervals[i] > start.intervals[i].

njp

NULL or the number of joinpoints corresponding to one of the fitted models in fit.uncond. If njp = k, then the conditional probabilities will be based on the model with k joinpoints. If NULL, then the model corresponding to the best fit returned by joinpoint will be used.

Details

This function computes the conditional survival

P(T > t_{j+k} | T > t_{j}) = \frac{P(T > t_{j+k})}{P(T > t_{j})}, \hspace{0.1in} k = 1, \ldots , m

Value

A data frame similar to the fullpredicted data frame returned from joinpoint except that it will only the contain rows corresponding to the start.intervals and end.intervals that were specified. The data frame will also contain the additional column "Start.interval", and will be grouped by the start.intervals.

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.seerdata

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 the unconditional survival join point model
fit <- joinpoint(breast.example, subset,
                 year="Year_of_diagnosis_1975",
                 model.form=NULL, maxnum.jp=0)

# Compute conditional survival S(10 | 5) = P(T>10 | T>5)
ret <- joinpoint.conditional(fit, 5, 10) 


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