Description Usage Arguments Details Value Author(s) References See Also Examples

Provides with a class of analytical methods and graphical approaches for checking the assumptions of the Fine and Gray subdistribution hazards model based on the cumulative sums of residuals. It validates the model in three aspects: proportionality of hazard ratio, the linear functional form, and the link function.

1 2 |

`formula` |
a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a competing risks object as returned by the Crsk function. |

`data` |
a dataset contains the time, causes of event, and the covariates. For the causes, 0 is censoring, 1 is the cause of interest, 2 is all other causes. |

`test` |
type of diagnostic method used in the test. One test at a time. "lin" generates the results of testing linear functional form for each covariate and link function. "prop" generates the results of testing proportionality for each covariate and overall proportionality. |

`Nit` |
number of iterations in model estimation. Default is 20. |

`n.sim` |
number of iterations in the analytical diagnostics. Default is 1000. |

`n.plot` |
number of plots of simulated processes used in the graphical diagnostics. Default is 10. |

`seed` |
a seed used in generating the simulated processes. |

`minor_included` |
include the minor term in FG model if TRUE. Default is TRUE. |

More details about the model diagnostic procedures can be found in Li, Scheike and Zhang (2015).

`test` |
type of diagnostic method used in the test. |

`varname` |
covariate names. |

`used` |
total sample size used in analysis. Subject with missing value will be excluded from analysis. |

`NJP` |
total number of unique time points for the cause of interest. |

`TJP` |
unique time points for the cause of interest leading by a zero. |

`n.plot` |
number of plots of simulated processes used in the graphical diagnostics. |

`beta` |
estimated regression coefficients. |

`beta.se` |
estimated standard errors for regression coefficients. |

`dlamb0` |
a vector of estimated cumulative baseline subdistribution hazards at observed failure times. |

`pval` |
p-values of the model diagnostic test. |

`mav` |
maximum value of the cumulative residual process (lin) or standardized residual process (prop). |

`B` |
cumulative residual process (lin) or standardized cumulative residual process (prop). Used for plot functions. |

`uniX` |
unique values of the covariates. Used for plot and available only when test="lin". |

`TC` |
number of unique covariates. Available only when test="lin". |

Jianing Li

Li, Jianing, Thomas H. Scheike, and Mei-Jie Zhang. "Checking Fine and Gray subdistribution hazards model with cumulative sums of residuals." Lifetime data analysis 21.2 (2015): 197-217.

Fine, Jason P., and Robert J. Gray. "A proportional hazards model for the subdistribution of a competing risk." Journal of the American statistical association 94.446 (1999): 496-509.

`diag_lin`

, `diag_prop`

, `plot.diaglin`

, `plot.diagprop`

, `print.diaglin`

, `print.diagprop`

1 2 3 4 5 6 7 8 9 |

```
Loading required package: cmprsk
Loading required package: survival
***P-values for model diagnostics***
Linear functional form for a single covariate:
z1 z2
0.177 0.007
Link function:
[1] 0.297
***P-values for model diagnostics***
Proportionality for a single covariate:
z1 z2
0.358 0.001
Overall proportionality:
[1] 0.044
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.