polyclass(data, cov, weight, penalty, maxdim, exclude, include,
additive = FALSE, linear, delete = 2, fit, silent = TRUE,
normweight = TRUE, tdata, tcov, tweight, cv, select, loss, seed)
data
should ranges over consecutive integers with 0 or 1 as the minimum value.data
.data
.-2 * loglikelihood + penalty * (dimension)
.
The default is to use penalty = log(lengt
length(data)
and
$cl$ the number of classes.exclude[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.polyclass
object. If fit
is specified, polyclass
adds
basis functions starting with those in fit
.data
, cov
and
weight
. If
all test set weights are one, tweight
can be omitted. If tdata
and tcov
are
specified, the model selcv
is
specified and tdata is omitted, the model selection is carried out by
cross-validation.loss[i, j]
contains the loss for
assigning action j
to .Random.seed
, otherwise
the function
polyclass
, organized
to serve as input for plot.polyclass
,
beta.polyclass
,
summary.polyclass
, ppolyclass
(fitted probabilities),
cpolyclass
(fitted classes) and rpolyclass
(random classes).
The function returns a list with the following members:nbas x (nclass + 4)
. each row is a basis function.
First element: first covariate involved (NA
= constant); second element: which knot (NA
means: constant or linear);
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, sixth,... element: beta (coefficient) for class one, two, ...
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.method = 2
.method = 1
or method = 2
.method = 0
.i
gives the range of the i
-th covariate.method = 0
or method = 2
) indicates whether the
model was fitted during the addition stage (1) or during the deletion stage (0),
column ten and eleven (or seven and eight) the minimum and maximum
penalty parameter for which AIC would have selected this model.method = 1
.method = 2
.method = 2
.method = 2
.method = 1
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.
polymars
,
plot.polyclass
,
summary.polyclass
,
beta.polyclass
,
cpolyclass
,
ppolyclass
,
rpolyclass
.data(iris)
fit.iris <- polyclass(iris[,5], iris[,1:4])
Run the code above in your browser using DataLab