Simulate Functional Data from different processes: Ornstein Uhlenbeck, Brownian, Fractional Brownian, Gaussian or Exponential variogram.
Arguments
- n
Number of functional curves to be generated.
- t
Discretization points.
- mu
vectorwhich specifies the trend values at the discretization points, by defaultmu=\(\mu(t)=0\). Ifmuis afdataclass object,t\(=\)argvals(mu).- sigma
A positive-definite symmetric matrix, \(\Sigma_{s,t}\), specifying the covariance matrix among grid points. If
sigmais ascalar, creates a random Gaussian process with \(\Sigma_{s,t}=\)sigmaI(by defaultsigma=1).
Ifsigmais avector, creates a random Gaussian process with \(\Sigma_{s,t}=\)diag(sigma).
Ifsigmais a character: create a random process using the covariance matrix \(\Sigma_{s,t}\) indicated in the argument,"OU"or"OrnsteinUhlenbeck", creates a random Ornstein Uhlenbeck process with \(\Sigma_{s,t}=\frac{\sigma^2}{2\theta}e^{-\theta\left(s+t\right)} \left(e^{2\theta\left(s+t\right)}-1\right)\), by default \(\theta=1/(3range(t))\), \(\sigma^2={1}\)."brownian"or"wiener", creates a random Wiener process with \(\Sigma_{s,t}=\sigma^2 min(s,t)\), by default \(\sigma^2=1\)."fbrownian", creates a random fractional brownian process with \(\Sigma_{s,t}=\sigma^{2H}/2{|s|^{2H}+|t|^{2H}-|s-t|^{2H}}\), by default \(\sigma^2=1\) and \(H=0.5\) (brownian process)."vexponential", creates a random gaussian process with exponential variogram \(\Sigma_{s,t}=\sigma^2 e^{\left(-\frac{\left|s-t\right|}{\theta}\right)}\), by default \(\theta={0.2 range(t)}\), \(\sigma^2={1}\).
- par.list
List of parameter to process, by default
"scale"\(\sigma^2=1\),"theta"\(\theta=0.2 range(t)\) and"H"=0.5.- norm
If
TRUEthe norm of random projection is 1. Default isFALSE- verbose
If
TRUE, information about procedure is printed. Default isFALSE.- ...
Further arguments passed to or from other methods.
Author
Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es
Examples
if (FALSE) { # \dontrun{
par(mfrow=c(3,2))
lent<-30
tt<-seq(0,1,len=lent)
mu<-fdata(rep(0,lent),tt)
plot(rproc2fdata(200,t=tt,sigma="OU",par.list=list("scale"=1)))
plot(rproc2fdata(200,mu=mu,sigma="OU",par.list=list("scale"=1)))
plot(rproc2fdata(200,t=tt,sigma="vexponential"))
plot(rproc2fdata(200,t=tt,sigma=1:lent))
plot(rproc2fdata(200,t=tt,sigma="brownian"))
plot(rproc2fdata(200,t=tt,sigma="wiener"))
#plot(rproc2fdata(200,seq(0,1,len=30),sigma="oo")) # this is an error
} # }