FFSCB p-value (t-distr)
get_pvalue_FFSCB_t.Rd
FFSCB p-value (t-distr)
Arguments
- x
Functional parameter estimate (for instance, the empirical mean function).
- x0
Functional parameter under the null hypothesis. Default: zero.
- tau
Pointwise standard deviation of the standardized and differentiated sample functions. Can be estimated by tau_fun().
- diag.cov
The diagonal of Cov(x), in which x is the functional estimator. For instance, the diagonal of the discretized covariance function of the empirical mean function x.
- df
Degrees of freedom parameter for the t-distribution based band 'FFSCB.t'. (Typically, df=N-1)
- eval.points
Evaluation points (in [0,1]) at which the pvalues should be computed.
- n_int
Number of intervals parameter used by the function make_band_FFSCB_t()
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
hat.tau <- tau_fun(sample)
# Compute simultaneous pvalue function
pval <- get_pvalue_FFSCB_t(x=hat.mu, x0=mu0, tau=hat.tau,
diag.cov=diag(hat.cov.mu), df=N-1,
eval.points=c(0.25, 0.75))
pval
#> [1] 0.3975007 0.1257804