Goodness-of-fit test for censored Z-residuals
Source:R/gof.censored.zresidual.R
gof.censored.zresidual.RdPerform a normality goodness-of-fit test for censored Z-residuals using
gofTestCensored. This is typically used to assess
whether censored Z-residuals are approximately standard normal under the
fitted survival model.
Value
A single numeric value: the p-value from
EnvStats::gofTestCensored using the Shapiro–Francia test
(test = "sf") for a right-censored normal distribution
(distribution = "norm"). Larger p-values indicate no strong
evidence against normality of the censored Z-residuals.
Details
Infinite residual values (both positive and negative) are truncated to
large finite values (+/- 1e10) before the test is applied.
The censoring indicator is taken from the "censored.status"
attribute of censored.Zresidual.