hare(data, delta, cov, penalty, maxdim, exclude, include, prophaz = FALSE,
additive = FALSE, linear, fit, 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 ofdata
. May be omitted
if there are no covariates. (If there are no covariates, however,
heft
will provide a more flexible model using cubic sp-2 * loglikelihood + penalty * (dimension)
.
The default is to use penalty = log(samplesize)
as in BIC. The effect of
this parexclude[1, 1] = 2
and exclude[1, 2] = 3
no
interaction between covariate 2 and 3 is included. 0 represents time.exclude
. Only one of exclude
and include
can be specified .linear = c(2, 3)
no knots for either covariate
2 or 3 are entered. 0 represents time. The default is none.hare
, which is organized to serve as input for plot.hare
,
summary.hare
, dhare
(conditional density), hhare
(conditional hazard rate), phare
(conditional probabilities), qhare
(conditional quantiles), and rhare
(random numbers).
The object is a list with the following members:ndim x 6
. each row is a basis function.
First element: first covariate involved (0 means time); second element: which knot (0 means: constant (time) or linear (covariate));
third element: second covariate involved (NA
means: this is a function of one variable);
fourth element: knot involved (if the third element is NA
, of no relevance);
fifth element: beta;
sixth element: standard error of beta.
ncov
rows.
Covariate i
has row i+1
, time has row 1.
First column: number of knots in this dimension;
other columns: the knots, appended with NA
s to make it a matrix.i
gives the range of the i
-th covariate.i
-th element of the first column
is the loglikelihood of the model of dimension i
. The second column indicates whether this
model was fitted during the addition stage (1) or during the deletion stage (0).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.
heft
,
plot.hare
,
summary.hare
,
dhare
,
hhare
,
phare
,
qhare
,
rhare
.fit <- hare(testhare[,1], testhare[,2], testhare[,3:8])
Run the code above in your browser using DataLab