heft(data, delta, penalty, knots, leftlin, shift, leftlog,
rightlog, maxknots, mindist, silent = TRUE)
data
. Elements of data
for which the corresponding element of delta
is 0 are assumed to be
right censored, elements of data
for which the corresponding element of -2 * loglikelihood + penalty * (dimension)
.
The default is to use penalty = log(samplesize)
as in BIC. The effect of
this parameknots
is not specified, a default knot-placement rule is employed.leftlin
is TRUE
an extra basis-function, which is linear to the left
of the first knot, is included in the basis.
If any of data
is exactly 0, the default of leftlin
is TRUE
,
otherwise quantile(data[delta == 1], .75)
.-1
.
(In particular, if leftlog
equals zero no
$\log \frac x{x + \mbox{shift}}$ term
is included.) If leftlog
is missing its maximum like-1
.
(In particular, if leftlog
equals zero no
$\log (x + \mbox{shift})$ term
is included.)
If rightlog
is missing its maximum likelihood estimatdata
.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:heft
model.k
-th element is the log-likelihood of the fit with k
knots.leftlog
and the second element equals rightlog
.thetal
.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
Run the code above in your browser using DataLab