Provide goodness-of-fit diagnostics for the transformation model.
gof(x, B = 200, P = 1)
x | an object of class |
---|---|
B | an integer value specifies the bootstrap size for the left-truncated regression model. A value greater than 2 is required. |
P | an integer value specifies number of breakpoints to test the linearity of the transformation model.
When |
A list containing the following elements
the regression coefficients of the left-truncated regression model.
the p-value for the equality of the piecewise linearity terms in the expanded model. See Details.
The googness of fit assessment of the transformation model focus on the structure of the
transformation model, which has the form:
$$h(U) = (1 + a)^{-1} \times (h(T) + ah(X)),$$
where \(T\) is the truncation time, \(X\) is the observed failure time,
\(U\) is the transformed truncation time that is quasi-independent from \(X\) and
\(h(\cdot)\) is a monotonic transformation function.
With the condition, \(T < X\), assumed to be satisfied,
the structure of the transformation model implies
$$X - T = -(1 + a) E(U) + (1 + a) X - (1 + a) \times [U - E(U)] := \beta_0 + \beta_1X + \epsilon.$$
The regression estimates can be obtained by the left-truncated regression model (Karlsson and Lindmark, 2014).
To evaluate the goodness of fit of the transformation model,
the gof()
function directly test the inearity in \(X\) by considering larger model that are nonlinear in \(X\).
In particular, we expand the covariates \(X\) to P
piecewise linearity terms and test for equality of the associated coefficients.
Karlsson, M., Lindmark, A. (2014) truncSP: An R Package for Estimation of Semi-Parametric Truncated Linear Regression Models, Journal of Statistical Software, 57 (14), pp 1--19.
data(channing, package = "boot") chan <- subset(channing, entry < exit) fit <- trReg(Surv(entry, exit, cens) ~ sex, data = chan) gof(fit, B = 25)#> #> Overall signficances based on left-truncated regression model: p-value = 0 #> #> The segments and the corresponding transformation parameters are: #> For segment (-Inf, 988] , the transformation parameter is -0.2554195 #> For segment (988, Inf] , the transformation parameter is -0.8103057 #>