Description Usage Arguments Value Author(s) References Examples
View source: R/ZBsplineBasis.R
Spline basis system having zerointegral on I=[a,b] of the L^2_0 space (called ZBsplines) has been proposed for an basis representation of fcenLR transformed probability density functions. The ZBspline basis functions can be back transformed to Bayes spaces using inverse of fcenLR transformation, resulting in compositional Bsplines (CBsplines), and forming a basis system of the Bayes spaces.
1  ZBsplineBasis(t, knots, order, basis.plot = FALSE)

t 
a vector of argument values at which the ZBspline basis functions are to be evaluated 
knots 
sequence of knots 
order 
order of the ZBsplines (i.e., degree + 1) 
basis.plot 
if TRUE, the ZBspline basis system is plotted 

matrix of ZBspline basis functions evaluated at a vector of argument values t 

number of ZBspline basis functions 
J. Machalova jitka.machalova@upol.cz, R. Talska talskarenata@seznam.cz
Machalova, J., Talska, R., Hron, K. Gaba, A. Compositional splines for representation of density functions. Comput Stat (2020). https://doi.org/10.1007/s00180020010427
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  # Example: ZBspline basis functions evaluated at a vector of argument values t
t = seq(0,20,l=500)
knots = c(0,2,5,9,14,20)
order = 4
ZBsplineBasis.out = ZBsplineBasis(t,knots,order, basis.plot=TRUE)
# Backtransformation of ZBspline basis functions from L^2_0 to Bayes space >
# CBspline basis functions
CBsplineBasis=NULL
for (i in 1:ZBsplineBasis.out$nbasis)
{
CB_spline = fcenLRinv(t,diff(t)[1:2],ZBsplineBasis.out$ZBsplineBasis[,i])
CBsplineBasis = cbind(CBsplineBasis,CB_spline)
}
matplot(t,CBsplineBasis, type="l",lty=1, las=1,
col=rainbow(ZBsplineBasis.out$nbasis), xlab="t",
ylab="CBspline basis",
cex.lab=1.2,cex.axis=1.2)
abline(v=knots, col="gray", lty=2)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.