Skip to contents

p-value (ellipsoid region)

Usage

get_pval_Ec(x, x0 = NULL, eigen, fpc.cut = NULL, prec = NULL)

Arguments

x

function argument

x0

Functional parameter under the null hypothesis. Zero function is assumed if it's not given.

eigen

eigen decomposition of covariance function

fpc.cut

It takes a vector of number of fPC to use in each HT. For integer values, fPC up to those values will be used. If it's a value from 0 to 1, this specifies the proportion of (estimated) variance that should be explained by the fPCs. If it is 0, all the available fPCs will be used as long as the size of eigenvalues are greater than .Machine$double.eps.

prec

This determines the accuracy of imhof. One may try to modify this if p-value achieved in Ellipsoid form other than Epc gives negative value. It should the the form of c(epsabs, epsrel, limit).

References

Choi, H. and Reimherr, M. (2018). A geometric approach to confidence regions and bands for functional parameters. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 80 239-260.

Examples

# Generate a sample
p <- 200 
N <- 80 
grid   <- make_grid(p, rangevals=c(0,1))
mu0    <- meanf_poly(grid,c(0,1))   ; names(mu0) <- grid
mu     <- meanf_poly(grid,c(0,1.1)) ; names(mu)  <- grid
cov.m  <- make_cov_m(cov.f = covf_st_matern, grid=grid, cov.f.params=c(2/2,1,1))
sample <- make_sample(mu,cov.m,N)

# Compute the estimate and its covariance
hat.mu     <- rowMeans(sample)
hat.cov    <- crossprod(t(sample - hat.mu)) / N
hat.cov.mu <- hat.cov / N

# Eigen decomposition
e.cov.mu <- eigen(hat.cov.mu)

# pvalue
pval <- get_pval_Ec(x=hat.mu, x0=mu0, eigen=e.cov.mu)
pval
#> [1] 3.644125e-09