Last data update: 2014.03.03

R: Evaluates a composition of warplets.
warpR Documentation

Evaluates a composition of warplets.

Description

The function warp evaluates a composition of warplets that are constructed by the function comp.

Usage

warp(A, Lambda, R1, R2, x)

Arguments

A

Vector of centers of the warplets.

Lambda

Vector of intensities.

R1

Vector of radii on the left-hand side of the centers.

R2

Vector of radii on the right-hand side of the centers.

x

Vector of time points at which to evaluate the warping function.

Value

warp contains the warping function evaluated at x, see also comp.

Author(s)

L. Slaets, G. Claeskens, B.W. Silverman.

References

See the papers: Slaets, Claeskens and Silverman (2010). Warping functional data in R and C via a Bayesian Multiresolution approach. Journal of Statistical Software, 55(3), 1-22,
URL http://www.jstatsoft.org/v55/i03/.

Claeskens, Silverman and Slaets (2010). A multiresolution approach to time warping achievec by a Bayesian prior-posterior transfer fitting strategy. Journal of the Royal Statistical Society, Series B, 72(5), 673-694.

Examples

t = seq(0,10,length.out=1000)
tau.t = warp(c(5,2),c(0.6,0.4),c(2,1.5),c(3,2),t)

## The function is currently defined as
warp =
function(A,Lambda,R1,R2,x)
{
Wx = x
for (i in 1:length(A))
    	{
	warp = comp(A[i],Lambda[i],R1[i],R2[i],Wx)
	Wx = warp
	}
return(Wx)
}

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MRwarping)
Loading required package: boa
Loading required package: SemiPar
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MRwarping/warp.Rd_%03d_medium.png", width=480, height=480)
> ### Name: warp
> ### Title: Evaluates a composition of warplets.
> ### Aliases: warp
> 
> ### ** Examples
> 
> t = seq(0,10,length.out=1000)
> tau.t = warp(c(5,2),c(0.6,0.4),c(2,1.5),c(3,2),t)
> 
> ## The function is currently defined as
> warp =
+ function(A,Lambda,R1,R2,x)
+ {
+ Wx = x
+ for (i in 1:length(A))
+     	{
+ 	warp = comp(A[i],Lambda[i],R1[i],R2[i],Wx)
+ 	Wx = warp
+ 	}
+ return(Wx)
+ }
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>