This add e.g., constraints zero intercept and slope for second-order random walk model.

nullspace_penalty(x)

Arguments

x

a precision matrix

Details

Using eigen decomposition to find the zero eigenvalues, which is then added back to the original penalized matrix. Note that this leads to loss of sparseness.