heft | R Documentation |
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 |
rightlog |
coefficient of |
maxknots |
maximum number of knots allowed in the model (default is
|
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. |
An object of class
heft
, which is organized to serve as input for plot.heft
,
summary.heft
, dheft
(density), hheft
(hazard rate), pheft
(probabilities), qheft
(quantiles), and rheft
(random numbers).
The object is a list with the following members:
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 |
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.
hare
,
plot.heft
,
summary.heft
,
dheft
,
hheft
,
pheft
,
qheft
,
rheft
.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.