powered by
psp(xx, lambda, nknots, diff)
n <- 300 t <- sort(round(runif(n),digits=2)) t2 <- psp(t, diff=3) N <- attr(t2, "N") ## B-spline basis matrix M <- attr(t2, "K") ## Penalty Matrix
Run the code above in your browser using DataLab