View source: R/source_relaxProp.R
joinpoint.relaxProp | R Documentation |
Fitting a joinpoint survival model by relaxing the proportionality assumption
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)
data |
Data frame containing all variables in the model. |
subset |
A logical vector of length |
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 |
interval |
Column name of |
number.event |
Column name of |
number.alive |
Column name of |
number.loss |
Column name of |
expected.rate |
Column name of |
observed.rate |
Column name of |
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 —
|
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 |
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, ...)
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 |
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.
joinpoint
, joinpoint.cond
#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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.