mfd | R Documentation |
The 'mfd' class represents a set of multidimensional functional data with 'basismfd' object. Functional data objects are constructed by specifying a set of basis functions and a set of coefficients defining a linear combination of these basis functions.
Constructor for 'mfd' objects (same as Mfd(...) )
Mfd(argval = NULL, X, mdbs, method = "data")
argval |
A list of numeric vectors of argument values at which the 'mfd' object is to be evaluated |
X |
A numeric matrix corresponds to basis expansion coefficients if 'method="coefs"' and discrete observations if 'method="data"'. |
mdbs |
a basismfd object |
method |
determine the 'X' matrix type as "coefs" and "data". |
basis
an object of the class 'basismfd'.
coefs
a matrix of the coefficients.
nobs
number of the observation
new()
Constructor for 'mfd' objects (same as Mfd(...) )
mfd$new(argval = NULL, X, mdbs, method = "data")
argval
A list of numeric vectors of argument values at which the 'mfd' object is to be evaluated
X
A numeric matrix corresponds to basis expansion coefficients if 'method="coefs"' and discrete observations if 'method="data"'.
mdbs
a basismfd object
method
determine the 'X' matrix type as "coefs" and "data".
eval()
Evaluation an 'mfd' object in some arguments.
mfd$eval(evalarg)
evalarg
a list of numeric vector of argument values at which the mfd
is to be evaluated.
A matrix of evaluated values
print()
Print method for 'mfd' objects
mfd$print(...)
...
Additional arguments to be passed to 'print'
clone()
The objects of this class are cloneable with this method.
mfd$clone(deep = FALSE)
deep
Whether to make a deep clone.
basismfd
require(fda)
bs1 <- create.fourier.basis(c(0,2*pi),5)
bs2 <- create.bspline.basis(c(0,1),7)
bs3 <- create.exponential.basis(c(0,2),3)
#1-D mfd :_____________________________
argval <- seq(0,2*pi,length.out=100)
nobs <- 10;
X <- outer(sin(argval),seq(0.5,1.5,length.out=nobs))
mdbs1 <- Basismfd(bs1)
mfd1 <- Mfd(X=X, mdbs = mdbs1)
inprod_mfd(mfd1,mfd1)
norm_mfd(mfd1)
mfd0 <- 2.5*mfd1
mfd1-mfd0
mfd1[1:3]
mfd1$eval(argval)
mfd1c <- Mfd(X=mfd1$coefs, mdbs = mdbs1, method = "coefs")
all.equal(c(mfd1$basis,mfd1$coefs,mfd1$nobs),c(mfd1c$basis,mfd1c$coefs,mfd1c$nobs))
length(mfd1)
mean(mfd1)
plot(mfd1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.