Learn R Programming

MFHD (version 0.0.1)

derivcurves: Computes the derivative of functional data.

Description

Often one set of curves y1 is given, and the second set of curves y2 are the (estimated) derivatives. This function computes these derivatives.

Usage

derivcurves(y1,method="bspline")

Arguments

y1
A n by T matrix of functional data.
method
Type of derivative method, for more information see details.

Value

Returns the derivative of functional data.

Details

  • If method="bspline", "exponential", "fourier", "monomial" or "polynomial", the "derivcurves" function creates a basis to represent the functional data.
  • If "method"="diff", raw derivation is applied. Not recommended to use this method when the values are not equally spaced.

This function is a wraper for "fda.usc::fdata.deriv". See help("fda.usc::fdata.deriv").

Examples

Run this code
set.seed(123)	
n<-50;
T<-100;	 
t.<-seq(0,2*pi,l=T)
y<-matrix(NA,n,T)
for(i in 1:n)	y[i,]<-runif(1,0,1)*sin(t.)+runif(1,0,1)*cos(t.)
y2<-derivcurves(y)	

Run the code above in your browser using DataLab