Description Usage Arguments Details Value References Examples
Estimate the cov function from functional data/snippets.
1 2 3 4 5 6 7 8 9 |
t |
a list of vectors (for irregular design) or a vector (for regular design) containing time points of observations for each individual; each vector should be in ascending order. |
y |
a list of vectors (for irregular design) or a matrix (for regular design) containing the observed values at |
newt |
a list of vectors or a vector containing time points of observations to be evaluated; if NULL, then |
mu |
the known or estimated mean function object; it must be a scalar (viewed as a constant function), a function handle, or an object obtained by calling |
weig |
a vector of |
method |
estimation method, 'PACE' or 'FOURIER' or 'SP' (for semiparametric method) |
... |
other parameters required depending on the |
tuning |
tuning method to select possible tuning parameters |
When method='PACE', additional parameters are
kernelkernel type; supported are 'epanechnikov', "rectangular", "triangular", "quartic", "triweight", "tricube", "cosine", "gauss", "logistic", "sigmoid" and "silverman"; see https://en.wikipedia.org/wiki/Kernel_(statistics) for more details.
degdegree of the local polynomial regression; currently only deg=1 is supported.
bwbandwidth
When method='FOURIER', additional parameters are
qnumber of basis functions; if NULL then selected by tuning method
rhoroughness penalty parameter; if NULL then selected by tuning method
extextension margin of Fourier extension; if NULL then selected by tuning method
domaintime domain; if NULL then estimated by (min(t),max(t))
When method='SP', additional parameters are
domaintime domain; if NULL then estimated by (min(t),max(t))
corffunction of the form function(theta,x,y) that specifies the correlation structure with parameter theta; If NULL then Matern correlation is used.
sig2evariance of measurement error; if NULL the automatically calculated by the calling sigma2
sig2xvariance function; a function or an object generated by varfunc; if NULL then automatically estimated by calling varfunc
pfuncpenalty function on the estimation; Not used yet.
theta0Initial value for the parameter theta to be estimated; NULL by default
lbvector of lower bound of theta; if NULL then set to -Inf for all coordinate
ubvector of upper bound of theta; if NULL then set to Inf for all coordinate
Ddimension of theta
an object of the class 'covfunc' containing necessary information to predict/evaluate the estimated covariance function and the following output:
When method='PACE', additional parameters are
fittedfitted value at the grid spanned by newt
deltathe largest span among all subjects; note that it is not normalized by the span of the whole study.
bwselected bandwidth by tuning method if NULL is the input for bw.
muestimated mean function if NULL is the input.
When method='FOURIER', additional parameters are
fittedfitted value at the grid spanned by newt
qselected q if NULL is the input
rhoselected rho if NULL is the input
extselected ext if NULL is the input
Cestimated coefficients
muestimated mean function if NULL is the input.
When method='SP', additional parameters are
fittedfitted value at the grid spanned by newt
domaintime domain; if NULL then estimated by (min(t),max(t)).
rhoestimated function of the form function(x,y) of the correlation structure.
sig2eestiamted variance of measurement error if NULL is the input.
sig2xestiamted variance function if NULL is the input.
thetaestimated parameters for the correlation structure.
muestimated mean function if NULL is the input.
Lin2020bmcfda
\insertRefLin2020mcfda
\insertRefYao2005mcfda
1 2 3 4 5 6 7 | mu <- function(s) sin(2*pi*s)
D <- synfd::sparse.fd(mu=mu, X=synfd::gaussian.process(), n=100, m=5)
mu.obj <- meanfunc(D$t,D$y,newt=NULL,method='PACE',
tuning='cv',weig=NULL,kernel='gauss',deg=1)
cov.obj <- covfunc(D$t,D$y,newt=NULL,mu=mu.obj,method='FOURIER',
tuning='cv',weig=NULL,domain=c(0,1))
cov.hat <- predict(cov.obj,regular.grid())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.