calc_risk_WB: Calculate Weibull absolute risk profiles

View source: R/calc_risks.R

calc_risk_WBR Documentation

Calculate Weibull absolute risk profiles

Description

This alias function calculates absolute risk profiles under weibull baseline hazard specifications. Used for backwards compatibility.

Usage

calc_risk_WB(
  para,
  Xmat1,
  Xmat2,
  Xmat3,
  t_cutoff,
  t_start = 0,
  tol = 0.001,
  frailty = TRUE,
  type = "marginal",
  gamma = 1,
  model = "semi-markov",
  h3_tv = "none",
  tv_knots = NULL
)

Arguments

para

A numeric vector of parameters, arranged as follows: the first k_1+k_2+k_3 elements correspond to the baseline hazard parameters, then the k_1+k_2+k_3+1 element corresponds to the gamma frailty log-variance parameter, then the lastq_1+q_2+q_3 elements correspond with the regression parameters.

Xmat1

Numeric matrices with n rows and q_1,q_2,q_3 columns containing covariates.

Xmat2

Numeric matrices with n rows and q_1,q_2,q_3 columns containing covariates.

Xmat3

Numeric matrices with n rows and q_1,q_2,q_3 columns containing covariates.

t_cutoff

Numeric vector indicating the time(s) to compute the risk profile.

t_start

Numeric scalar indicating the dynamic start time to compute the risk profile. Set to 0 by default.

tol

Numeric value for the tolerance of the numerical integration procedure.

frailty

Boolean indicating whether a gamma distributed subject-specific frailty should be included. Currently this must be set to TRUE.

type

String either indicating 'marginal' for population-averaged probabilities, or 'conditional' for probabilities computed at the specified gamma

gamma

Numeric value indicating the fixed level of the frailty assumed for predicted probabilities, if 'type' is set to 'conditional'

model

String specifying the transition assumption

h3_tv

String indicating whether there is an effect of t1 on hazard 3.

tv_knots

for piecewise effect of t1 in h3, these are the knots at which the effect jumps

Value

if Xmat has only one row, and t_cutoff is a scalar, then returns a 4 element row matrix of probabilities. If Xmat has n rows, then returns an n by 4 matrix of probabilities. If Xmat has n rows and t_cutoff is a vector of length s, then returns an s by 4 by n array.


hreed7/SemiCompRisksPen documentation built on Dec. 15, 2024, 5:41 p.m.