GetMeanCurve | R Documentation |
Mean curve calculation for dense or sparse functional data.
GetMeanCurve(Ly, Lt, optns = list())
Ly |
A list of n vectors containing the observed values for each individual. Missing values specified by |
Lt |
A list of n vectors containing the observation time points for each individual corresponding to y. Each vector should be sorted in ascending order. |
optns |
A list of options control parameters specified by Available control options are
|
A list containing the following fields:
mu |
A vector of length nWorkGrid containing the mean function estimate. |
workGrid |
A vector of length nWorkGrid. The internal regular grid on which the mean estimation is carried out. |
bwMu |
The selected (or user specified) bandwidth for smoothing the mean function. |
optns |
A list of actually-used options relevant to the mean function calculation. |
set.seed(1)
n <- 20
pts <- seq(0, 1, by=0.025)
sampWiener <- Wiener(n, pts)
mu = sin(2*pi*pts)
sampWiener <- Sparsify(t(t(sampWiener) + mu), pts, 10)
res = GetMeanCurve(Ly = sampWiener$Ly, Lt = sampWiener$Lt, optns = list(plot = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.