SimStudy: A simulation study on penalized B-splines' MSE performance

SimStudyR Documentation

A simulation study on penalized B-splines' MSE performance

Description

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.

Usage

SimStudy(n, degree, periodic = FALSE, n2s.ratio = 0.2, n.sim = 100, nc = 1)

Arguments

n

number of unevenly spaced x-values. This argument is passed to RandomSpl.

degree

polynomial degree of the spline.

periodic

TRUE to generate a periodic spline; FALSE to generate an ordinary spline. This argument is passed to RandomSpl.

n2s.ratio

a noise-to-signal ratio that is used when simulating noisy y-values.

n.sim

number of simulations.

nc

number of CPU cores to use for parallel simulations.

Details

See Section 3 of the reference.

Value

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.

Author(s)

Zheyuan Li zheyuan.li@bath.edu

References

Li, Z. and Cao, J. (2022). General P-Splines for Non-Uniform B-Splines.

Examples

## Not run: 

require(gps.mgcv)

SimStudy(n = 400, degree = 3, n2s.ratio = 0.2, n.sim = 5)

## End(Not run)

ZheyuanLi/gps.mgcv documentation built on Sept. 19, 2024, 9:11 p.m.