gof {tranSurv}R Documentation

Goodness of fit based on left-truncated regression model

Description

Provide goodness-of-fit diagnostics for the transformation model.

Usage

gof(x, B = 200, P = 1)

Arguments

x

an object of class trSurvfit returned by the trSurvfit() or the trReg() function or a survival object returned by the Surv().

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 P > 0, PP breakpoints divides the event times into PP equal spaced segments. Piecewise linear function constructed from those segments of event times are used in the left-truncated regression model, and the overall significance testing if the coefficient estimates are equal is reported. Default value for P is 1. See Details for a description of the goodness of fit procedure.

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×(h(T)+ah(X)),h(U) = (1 + a)^{-1} \times (h(T) + ah(X)),

where TT is the truncation time, XX is the observed failure time, UU is the transformed truncation time that is quasi-independent from XX and h()h(\cdot) is a monotonic transformation function. With the condition, T<XT < X, assumed to be satisfied, the structure of the transformation model implies

XT=(1+a)E(U)+(1+a)X(1+a)×[UE(U)]:=β0+β1X+ϵ.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 XX by considering larger model that are nonlinear in XX. In particular, we expand the covariates XX to P piecewise linearity terms and test for equality of the associated coefficients.

Value

A list containing the following elements

coefficients

the regression coefficients of the left-truncated regression model.

pval

the p-value for the equality of the piecewise linearity terms in the expanded model. See Details.

References

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.

Examples

data(channing, package = "boot")
chan <- subset(channing, entry < exit)
fit <- trReg(Surv(entry, exit, cens) ~ sex, data = chan)
gof(fit, B = 10)

[Package tranSurv version 1.2.2 Index]