get_default_knots_list: Generate List of Knot Location Vectors from Event Times

View source: R/model_helper_functions.R

get_default_knots_listR Documentation

Generate List of Knot Location Vectors from Event Times

Description

This function creates a list containing three numeric vectors. Each numeric vector is a sequence of increasing integers giving the location of knots used for spline and piecewise baseline hazard specifications. This function generates this list according to the conventions and recommended locations of these knots, which depends on the choice of hazard specification, number of knots requested, and distribution of observed event times.

Usage

get_default_knots_list(y1, y2, delta1, delta2, p01, p02, p03, hazard, model)

Arguments

y1

Numeric vectors of length n with (possibly censored) non-terminal and terminal event times

y2

Numeric vectors of length n with (possibly censored) non-terminal and terminal event times

delta1

Numeric vectors of length n with indicators of 1 if the event was observed and 0 otherwise

delta2

Numeric vectors of length n with indicators of 1 if the event was observed and 0 otherwise

p01, p02, p03

Integers indicating how many parameters the model for each transition baseline hazard should specify.

hazard

String specifying the form of the baseline hazard.

model

String specifying the transition assumption

Value

A list of three increasing sequences of integers, each corresponding to the knots for the flexible model on the corresponding transition baseline hazard.


harrisonreeder/SemiCompRisksPen documentation built on Dec. 13, 2024, 5:30 a.m.