Coverage: Coverage indicators for a Blend object

View source: R/coverage.R

CoverageR Documentation

Coverage indicators for a Blend object

Description

Calculate coverage indicators for varying and constant effects based on posterior credible intervals.

Usage

Coverage(x, truth, level = 0.95, n.grid = 200)

Arguments

x

A fitted Blend object.

truth

A list of true coefficient functions and constant coefficients, including the intercept.

level

The credible interval level. The default is 0.95.

n.grid

The number of equally spaced grid points used to evaluate coefficient function coverage. The default is 200.

Value

A list of binary coverage indicators for the intercept and covariate effects, where 1 indicates coverage and 0 indicates non-coverage.

See Also

Blend

Examples


data(dat)
fit = Blend(y, x, t, J, kn, degree)

u = as.numeric(fit$basis$u)

truth = list(
  gamma0 = function(u) 2+2*sin(2*pi*u),
  gamma1 = function(u) 2.5*exp(2.5*u-1),
  gamma2 = function(u) 3*u^2-2*u+2,
  gamma3 = function(u) -4*u^3+3,
  gamma4 = function(u) 3-2*u,
  gamma5 = 0.8,
  gamma6 = -1.2,
  gamma7 = 0.7,
  gamma8 = -1.1,
  gamma9 = 0,
  gamma10 = 0,
  gamma11 = 0,
  gamma12 = 0,
  gamma13 = 0,
  gamma14 = 0,
  gamma15 = 0
)

out = Coverage(fit, truth)
out



Blend documentation built on Dec. 1, 2026, 1:07 a.m.