Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rcombfdata

Utils for generate functional data


Description

gridfdata generates n curves as lineal combination of the original curves fdataobj plus a functional trend mu.

Usage

rcombfdata(n = 10, fdataobj, mu, sdarg = rep(1, nrow(fdataobj)), norm = 1)

gridfdata(coef, fdataobj, mu)

Arguments

n

Number of curves to be generated

fdataobj

fdata class object.

mu

Functional trend, by default mu=μ(t)=0. An object of class fdata. t=argvals(mu).

sdarg

Standard deviation of the coefficients.

norm

Norm of the coefficients. The norm is adjusted before the transformation for sdarg is performed.

coef

Coefficients of the combination. A matrix with number of columns equal to number of curves in fdataobj

Details

rcombfdata generates n random linear combinations of the fdataobj curves plus a functional trend mu. The coefficients of the combinations follows a normal distribution with zero mean and standard deviation sdarg.

Value

Return the functional trajectories as a fdata class object.

Author(s)

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@usc.es

See Also

See Also as rproc2fdata

Examples

## Not run: 
tt=seq(0,1,len=51)
fou3=create.fourier.basis(c(0,1),nbasis=3)
fdataobj=fdata(t(eval.basis(tt,fou3)),argvals=tt)

coef=expand.grid(0,seq(-1,1,len=11),seq(-1,1,len=11))
grid=gridfdata(coef,fdataobj)
plot(grid,lty=1)

rcomb=rcombfdata(n=51,fdataobj,mu=fdata(30*tt*(1-tt),tt))
plot(rcomb,lty=1)

## End(Not run)

fda.usc

Functional Data Analysis and Utilities for Statistical Computing

v2.0.2
GPL-2
Authors
Manuel Febrero Bande [aut], Manuel Oviedo de la Fuente [aut, cre], Pedro Galeano [ctb], Alicia Nieto [ctb], Eduardo Garcia-Portugues [ctb]
Initial release
2020-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.