SimStudy | R Documentation |
Compare MSE performance of O-spline ("os"), standard P-spline ("sps") and general P-spline ("gps") via a simulation study with random curves generated by RandomSpl
.
SimStudy(n, degree, periodic = FALSE, n2s.ratio = 0.2, n.sim = 100, nc = 1)
n |
number of unevenly spaced |
degree |
polynomial degree of the spline. |
periodic |
TRUE to generate a periodic spline; FALSE to generate an ordinary spline. This argument is passed to |
n2s.ratio |
a noise-to-signal ratio that is used when simulating noisy |
n.sim |
number of simulations. |
nc |
number of CPU cores to use for parallel simulations. |
See Section 3 of the reference.
A matrix of MSE values. It has n.sim
rows and (3 * degree)
named columns. A name is like "spl.m", where "spl" is an abbreviation ("os", "sps" or "gps") and "m" is a penalty order from 1 to degree
.
Zheyuan Li zheyuan.li@bath.edu
Li, Z. and Cao, J. (2022). General P-Splines for Non-Uniform B-Splines.
## Not run:
require(gps.mgcv)
SimStudy(n = 400, degree = 3, n2s.ratio = 0.2, n.sim = 5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.