1 2 |
t |
Numeric vector of measurement times. |
y |
Numeric vector of values to be fitted. |
gfun |
Choice of Greens function (choose from G1-G10). |
y0 |
Numeric value to move y-values up or down. Per default y0 = 0. |
mp |
Integer value. Number of points to evaluate spline in. |
constr |
Integer value in (0, 1, 2). Choice of constraint. 0: Positivity contraint. 1: Monotonicity constraint. 2: Convexity/concavity constraint. |
sign |
Numeric value in (-1, 1). 1: Increasing, convexity. -1: Decreasing, concavity. |
lambda |
Smoothness parameter. |
1 2 3 4 5 6 7 8 9 10 11 12 | t = generate.t(m = 25); y = generate.y(type = 2)(t) + generate.noise(t) + generate.noise(t)
plot(t, y, col = "blue")
S = L2splineC(t, y, 3, constr=1)
lines(attr(S, "t"), S)
t = generate.t(m = 25); y = -generate.y(type = 3)(t) + generate.noise(t) + generate.noise(t)
plot(t, y, col = "blue")
S = L2splineC(t, y, 3, constr=2, sign=-1)
lines(attr(S, "t"), S)
t = generate.t(m = 40); y = generate.y(type = 4)(t) + generate.noise(t)
plot(t, y, col = "blue")
S = L2splineC(t, y, 1, constr=0)
lines(t, S)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.