Learn R Programming

pencopula (version 0.2.1)

my.bspline: my.bspline

Description

'my.bspline' Integrates the normal B-Spline basis to a B-spline density basis. The dimension of the basis depends on the input of number of knots 'k' and of the order of the B-spline basis 'q'. 'int.my.bspline' is a function for transformation of open B-spline basis at the boundary to become a B-spline basis density.

Usage

my.bspline(h, q, knots, y, K, plot.bsp, typ)
int.my.bspline(help.env)

Arguments

h
if equidistant knots are used (default in pencopula()), h is the distance between two neighbouring knots
q
selected order of the B-spline basis
knots
selected values for the knots
y
values of the response variable
K
the number of knots for the construction of the base
plot.bsp
Indicator variable TRUE/FALSE if the integrated B-spline basis should be plotted
typ
typ==1 without open B-splines at the boundary typ==2 with open B-splines at the boundary
help.env
Internal environment of my.bspline().

Value

  • base.denThe integrated B-Spline base of order q
  • stand.numThe coefficients for standardization of the ordinary B-Spline basis
  • knots.valThis return is a list. It consider of the used knots 'knots.val$val', the help knots 'knots.val$help' and the additional knots 'knots.val$all', used for the construction of the base and the calculation of the distribution function of each B-Spline.
  • KThe transformed value of K, due to used order 'q' and the input of 'K'

Details

Firstly, the function constructs the B-spline basis to the given number of knots 'K' and the given locations of the knots. Due to the recursive construction of the B-Spline, for all orders greater than 2, the dimension of the B-spline basis of given K grows up with help.degree=q-2. There are two typs of B-spline basis possible. First, a B-spline basis without open B-splines at the boundary (typ==1) and a regulat B-spline basis with open B-splines at the boundary (typ==2). Both typs are integrated to become B-spline density basis. To integrate a basis of typ 1 we use the well-known factor 'q/(knots.val[i+q]-knots.val[i])'. For typ==2 we determine functions analytically for the integration. Moreover, one can draw the integrated basis and, if one calls this function with the argument 'plot.bsp=TRUE'.