Skip to contents

The cov_spline function is used to perform natural spline interpolation on the covariance matrix.

Usage

cov_spline(cov, grid, n_intrpl)

Arguments

cov

a numeric square matrix of raw covariance. It must not contain missing values.

grid

a numeric vector of grid, at which the raw covariance is calculated.

n_intrpl

the number of points at which the covariance is interpolated. The interpolation is performed on a sequence of n_intrpl equidistant points from the minimum to the maximum of grid.

Value

The cov_spline function returns a numeric matrix of covariance interpolation.

References

Fang, C. and Liebl, D. (2026). Making Event Study Plots Honest: A Functional Data Approach to Causal Inference. arXiv:2512.06804.

Examples

cov_mat <- cov(matrix(rnorm(250),nrow=50))
grid <- seq(0,1,len=5)
cov_spline_mat <- cov_spline(cov=cov_mat, grid=grid, n_intrpl=50)