makediff3: 'Diffmatrix'

Description Usage Arguments Value See Also Examples

Description

The first observation is assumed to be not censored (delta = 1). The Difference is computed between data point i and its neighbour that has the largest survival time but smaller than y_i, the survival time of i.

Usage

1
makediff3(Y, delta)

Arguments

Y

[vector(1)]
Ordered vector of survival times.

delta

[vector(1)]
Vector of status.

Value

[Diffmatrix(1)] Object of class Diffmatrix with elements:

Type type of makediff function used to compute differences between neighbours.
Mat matrix used to compute differences between comparable data points.

See Also

makediff1 and makediff2

Examples

1
Y <- c(1,3,3.5,4,8); delta <- c(0,0,1,1,0); makediff3(Y, delta)

Example output

Loading required package: survival
$Type
[1] "diff3"

$Mat
     [,1] [,2] [,3] [,4] [,5]
[1,]   -1    1    0    0    0
[2,]   -1    0    1    0    0
[3,]    0    0   -1    1    0
[4,]    0    0    0   -1    1

attr(,"class")
[1] "Diffmatrix"

survivalsvm documentation built on May 2, 2019, 9:29 a.m.