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

View source: R/source_cond.R

joinpoint.condR Documentation

Fitting a join point conditional relative survival model

Description

Fitting a joinpoint conditional relative survival model

Usage

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

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.

start.interval

A positive integer giving the number of intervals to condition on.

end.interval

A positive integer > start.interval giving the end number of intervals.

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 interval survival. This column must be numeric. The default is 'Expected_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 "_ALL_".

Details

The data to be included in the analysis must contain unique year, interval pairs. If not, then an error will be thrown. The subset option can be used to ensure that there are unique pairs of year and interval.

This function will set up the data based on the value of start by removing all rows with interval less than or equal to start and then call the joinpoint function.

Value

An object of class "joinpoint" will be returned with attributes:

coefficients

a named vector of coefficients and standard errors

jp

the estimates of the join points

converged

convergence status

predicted

the fitted relative survival rates

fullpredicted

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

xbeta

the linear predictor

ll

log likelihood

aic

AIC

bic

BIC

FitList

a list that contains fitting results for the number of joinpoints = 0,1,...,numJPoints respectively.

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

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 conditional survival join point model with starting
#   interval 5 
fit <- joinpoint.cond(breast.example, subset, 5, 
                 year="Year_of_diagnosis_1975",
                 model.form=NULL, maxnum.jp=0)

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