Description Usage Arguments Value See Also Examples
Simulate function y = Ba where the a's are governed by P-spline process
1 | GetPSplines(B.ik, sigma.alpha, order, seed = 123)
|
B.ik |
a matrix of B-Splines |
sigma.alpha |
variance of spline coefficients |
order |
order of penalization (either 1 or 2). |
seed |
value of random seed |
A list containing: a matrix of B-spline values; and a vector of knot locations.
1 2 3 4 5 6 | x.i <- seq(1, 50, 1)
res <- GetSplines(x.i, I = 2.5)
nobs <- length(x.i)
sigma.alpha <- 0.01
y.i <- GetPSplines(res$B.ik, sigma.alpha, order = 1)
ggplot(data = NULL, aes(x = x.i, y = y.i)) + geom_line() + geom_point() + theme_bw()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.