MIC.splines.basis: Splines basis functions

Description Usage Arguments Value Author(s) References See Also Examples

Description

Creation splines basis for M_splines, I_splines and C_splines

Usage

1
2
MIC.splines.basis(x, df = NULL, knots = NULL, boundary.knots = NULL, 
type = "Ms", degree = 3, delta = 0.01, eq.alloc = F)

Arguments

x

values of covariate

df

number of splines needed which is equal to knots+degree

knots

number of knots needed which does not include the number of knots at the beginning

boundary.knots

the values of boundary knots, which are usually the minimum and maximum of covariate

type

types of splines basis needed, which can be Ms Is or Cs

degree

degree of the splines function

delta

the length of the spans to split the range of covariate

eq.alloc

indicators of whether the knots are equally allocated

Value

list(mat=mat,x=x, df=df, knots=knots,boundary.knots=boundary.knots, type=type,degree=degree,delta=delta)

mat

it is a matrix of splines basis

x

the input of covariate

df

the input of number of splines needed

knots

the input of number of knots needed not including the boundary

boundary.knots

the values of boundary knots

type

type of splines function which can be MS IS or Cs

degree

degree of the splines functions

delta

the length of the spans to split the range of covariate

Author(s)

Yili Hong

References

Hong. Y., Y. Duan, W. Q. Meeker, D. L. Stanley, and X. Gu (2014), Statistical Methods for Degradation Data with Dynamic Covariates Information and an Application to Outdoor Weathering Data, Technometrics, DOI: 10.1080/00401706.2014.915891.

See Also

i.spline.x, m.spline.x

Examples

1
2
MIC.splines.basis(x=runif(20), df = NULL, knots = 3, boundary.knots = NULL, 
    type = "Ms", degree = 4, delta = 0.01, eq.alloc = FALSE) 

Example output

Loading required package: survival
Loading required package: nlme
$mat
           [,1]      [,2]       [,3]         [,4] [,5]
 [1,] 1.0228286 0.8578623 0.33885646 0.0496642331    0
 [2,] 0.5858675 0.8283815 1.05214867 0.8230083830    0
 [3,] 0.9187883 0.9514458 0.52738034 0.1145050414    0
 [4,] 0.4793617 0.6846780 0.97793340 1.3960970501    0
 [5,] 0.6523582 0.8995873 0.99934449 0.5828767339    0
 [6,] 0.8959170 0.9632678 0.57154693 0.1347866020    0
 [7,] 0.4934618 0.7047936 1.00362799 1.3032668766    0
 [8,] 1.1482064 0.6592169 0.15599415 0.0130686331    0
 [9,] 1.1733718 0.6082439 0.12682523 0.0092900461    0
[10,] 1.3228894 0.2311999 0.01425827 0.0002974498    0
[11,] 1.0309817 0.8477792 0.32527333 0.0461418787    0
[12,] 0.6522606 0.8994971 0.99945819 0.5831790090    0
[13,] 1.1621786 0.6313682 0.13945922 0.0108583597    0
[14,] 1.3965848 0.0000000 0.00000000 0.0000000000    0
[15,] 1.0175843 0.8641377 0.34770127 0.0520325322    0
[16,] 0.6973195 0.9360947 0.93860908 0.4571702984    0
[17,] 0.7883820 0.9768953 0.78064012 0.2706680183    0
[18,] 0.6752599 0.9194535 0.97037367 0.5156101475    0
[19,] 0.7404332 0.9611669 0.86807234 0.3588616252    0
[20,] 0.6684744 0.9138368 0.97941750 0.5348109141    0

$x
 [1] 0.4183074 0.8559412 0.5089904 0.9946445 0.7777191 0.5298339 0.9751723
 [8] 0.3168586 0.2973978 0.1871618 0.4114659 0.7778300 0.3060190 0.1358703
[15] 0.4227273 0.7277950 0.6329043 0.7520125 0.6818999 0.7595677

$df
NULL

$knots
[1] 3

$boundary.knots
[1] 0.1358703 0.9947445

$type
[1] "Ms"

$degree
[1] 4

$delta
[1] 0.01

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

SPREDA documentation built on May 2, 2019, 4 p.m.