GrGenNPH: GrGenNPH

Description Usage Arguments Value Examples

View source: R/GrGenNPH.R

Description

This function calculates the neg-gradient of the loglikelihood for the parametric gamma-frailty model with non-proportional hazard functions

Usage

1
GrGenNPH(y, D, nf, nk, ncl, dist)

Arguments

y

Vector of parameters in the form

y = (ln(a), ln(b), β _{shape}, β _{scale}, ln(σ ^2))

for Weibull hazard function and

y = (ln(10^3a), ln(10^2b), β _{shape}, β _{scale}, ln(σ ^2))

for Gompertz hazard function, where a and b are slope and shape parameters, β _{shape} and β _{scale} are the Cox-regression parameters for shape and scale, respectively, and σ ^2 is the variance of frailty. This vector must include at least two parameters, ln(a) and ln(b).

D

A data.frame in which to interpret the variables named in the formula. The data set includes the following fields:

  1. time-to-failure and censoring in the case without left truncation or time-of-start, time-of-failure, and censoring in the case with left truncation at the time of begin (censoring must be either 0 for no event or 1 for event);

  2. Covariates (continuous or categorical) used in a study (can be empty set).

nf

The number of continuous and binary factors in the data set D corresponding to the covariates used in the Cox-regression for proportional hazard term.

nk

The number of continuous and binary factors in the data set D corresponding to the covariates used in the Cox-regression for shape b.

ncl

The number of clusters in the data set D corresponding to the cluster covariate. Is equal to 0 for the fixed-effect model.

dist

Baseline hazard function ('Weibull' or 'Gompertz').

Value

Neg-gradient of the loglikelihood

Examples

1
2
3
4
## Not run: 
GrGenNPH(y, D, nf, nk, ncl, dist)

## End(Not run)

AB5103/doubleCoxr documentation built on Feb. 20, 2022, 2:20 p.m.