Heft: hazard estimation with flexible tails
Hazard estimation using cubic splines to approximate the log-hazard function and special functions to allow non-polynomial shapes in both tails.
heft(data, delta, penalty, knots, leftlin, shift, leftlog, rightlog, maxknots, mindist, silent = TRUE)
data |
vector of observations. Observations may or may not be right censored. All observations should be nonnegative. |
delta |
binary vector with the same length as |
penalty |
the parameter to be used in the AIC criterion. The method chooses
the number of knots that minimizes |
knots |
ordered vector of values, which forces the method to start with these knots.
If |
leftlin |
if |
shift |
parameter for the log terms. Default is |
leftlog |
coefficient of \code{log(x/(x+shift))}, which must be greater than
|
rightlog |
coefficient of \code{log(x+shift)}, which must be greater than
|
maxknots |
maximum number of knots allowed in the model (default is
\code{4 * n^0.2}, where n is the length of
|
mindist |
minimum distance in order statistics between knots. The default is 5. |
silent |
suppresses the printing of diagnostic output about knots added or deleted, Rao-statistics, Wald-statistics and log-likelihoods. |
knots |
vector of the locations of the knots in the |
logl |
the |
thetak |
coefficients of the knot part of the spline. The k-th coefficient is the coefficient of (x-t(k))^3_+. If a coefficient is zero the corresponding knot was considered and then deleted from the model. |
thetap |
coefficients of the polynomial part of the spline. The first element is the constant term and the second element is the linear term. |
thetal |
coefficients of the logarithmic terms. The first element equals
|
penalty |
the penalty that was used. |
shift |
parameter used in the definition of the log terms. |
sample |
the sample size. |
logse |
the standard errors of |
max |
the largest element of data. |
ad |
vector indicating whether a model of this dimension was not fit (2), fit during the addition stage (0) or during the deletion stage (1). |
Charles Kooperberg clk@fredhutch.org.
Charles Kooperberg, Charles J. Stone and Young K. Truong (1995). Hazard regression. Journal of the American Statistical Association, 90, 78-94.
Charles J. Stone, Mark Hansen, Charles Kooperberg, and Young K. Truong. The use of polynomial splines and their tensor products in extended linear modeling (with discussion) (1997). Annals of Statistics, 25, 1371–1470.
fit1 <- heft(testhare[,1], testhare[,2]) # modify tail behavior fit2 <- heft(testhare[,1], testhare[,2], leftlog = FALSE, rightlog = FALSE, leftlin = TRUE) fit3 <- heft(testhare[,1], testhare[,2], penalty = 0) # select largest model
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.