eval.Gspline | R Documentation |
This function computes values of
f(x) = sum[j=1][g] c[j]*phi(x; mu[j],sigma[j]^2)
in a grid of x values.
In above expression, phi(x; mu[j],sigma[j]^2) denotes a density of N(mu[j], sigma[j]^2).
eval.Gspline(Gspline, grid)
Gspline |
A data frame with at least three columns named
“Knot”, “SD basis” and “c coef.” which determine
mu[1], ..., mu[g],
sigma[1], ..., sigma[g] and
c[1], ..., c[g]. Data.frame with such
properties can be found e.g. as |
grid |
A numeric vector giving the grid of x values at which the G-spline is to be evaluated. |
A data.frame with columns named “x” (grid) and “y” (G-spline values).
Arnošt Komárek arnost.komarek@mff.cuni.cz
spline <- minPenalty(knots=seq(-4.2, 4.2, by=0.3), sdspline=0.2, difforder=3)$spline values <- eval.Gspline(spline, seq(-4.5, 4.5, by=0.05)) plot(values, type="l", bty="n", lwd=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.