regFuncy: Converts irregular data into regular.

Description Usage Arguments Details Value Author(s) References Examples

Description

Converts irregular data into regular by projecting it to a basis or interpolating it.

Usage

1
regFuncy(data, timeNr = 10, method = "project", baseType = NULL, nbasis = 4, plot = TRUE)

Arguments

data

Dataset in "Format1" (see funcit).

timeNr

Number of time points the regular dataset shall be evaluated at.

method

Method to tranform regularization with one of "project" or "interpolate". See Details.

baseType

Base type. Only used if method="project".

nbasis

Number of basis functions.

plot

Plot the result?

Details

Data is either interpolated or projected to a basis. For all methods, curve evaluation takes place on time points calculated by makeCommonTime.

Value

data

Numeric matrix of "Format1" (see formatFuncy).

time

Vector of evaluation time points.

Author(s)

Christina Yassouridis

References

Christina Yassouridis and Dominik Ernst and Friedrich Leisch. Generalization, Combination and Extension of Functional Clustering Algorithms: The R Package funcy. Journal of Statistical Software. 85 (9). 1–25. 2018

F. Yao and H.G. Müller and J.L. Wang. Functional data analysis for sparse longitudinal data. J. American Statistical Association. 100. 577–590. 2005 URL: http://www.stat.ucdavis.edu/PACE/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
##Generate irregular dataset
set.seed(2705)
ds <- sampleFuncy(reg=FALSE, obsNr=100, timeNrMin=5, timeNrMax=10)


reg <- regFuncy(Data(ds), timeNr=10, baseType="splines",nbasis=5, method="project")

reg <- regFuncy(Data(ds),timeNr=10, method="interpolate")

## Not run: 
reg <- regFuncy(Data(ds), timeNr=10, baseType="eigenbasis", nbasis=5,
method="project")

## End(Not run)

funcy documentation built on May 2, 2019, 9:22 a.m.

Related to regFuncy in funcy...