
Last chance! 50% off unlimited learning
Sale ends in
Note that bootstrap pointwise confidence intervals do not work for sparsely observed data.
GetMeanCI(Ly, Lt, level = 0.95, R = 999, optns = list())
A list of two elements:
A data frame holding three variables: CIgrid
--- the time grid where the CIs are evaluated; lower
and upper
--- the lower and upper bounds of the CIs on CIgrid
.
The confidence level of the CIs
.
A list of n vectors containing the observed values for each individual.
Missing values specified by NA
s are supported for dense case (dataType='dense')
.
A list of n vectors containing the observation time points for each
individual corresponding to each element in Ly
. Each vector should be sorted in ascending order.
A number taking values in [0,1] determing the confidence level. Default: 0.95.
An integer holding the number of bootstrap replicates. Default: 999.
A list of options; see FPCA
for details.
n <- 30
tgrid <- seq(0,1,length.out=21)
phi1 <- function(t) sqrt(2)*sin(2*pi*t)
phi2 <- function(t) sqrt(2)*sin(4*pi*t)
Lt <- rep(list(tgrid), n)
Ly <- lapply(1:n, function(i){
tgrid + rnorm(1,0,2) * phi1(tgrid) + rnorm(1,0,0.5) * phi2(tgrid) + rnorm(1,0,0.01)
})
res <- GetMeanCI(Lt = Lt, Ly = Ly, level = 0.9)
Run the code above in your browser using DataLab