# Specify the dimensions of the dense matrix
k <- 2
tt <- 5
m <- 3
# Generate artificial data
z <- matrix(NA, k * tt, m)
for (i in 1:tt) {
z[(i - 1) * k + 1:k, ] <- i
}
# Perform transformation
sur_const_to_tvp(z, k, tt)
Run the code above in your browser using DataLab