diff: Order of the differences to be applied to the parameters. Must be a strictly positive integer
Returns
Weighted penalty matrix DTdiag(w)D where D <- diff(diag(length(w) + diff), differences = diff). Only the non-null superdiagonals of the weight matrix are returned, each column corresponding to a diagonal.