Plot spline curves

viewSplines(knots, degree, theta)

knots | A vector of values between 0 and 1, specifying cut-points for splines |
---|---|

degree | Integer specifying degree of curvature. |

theta | A vector or matrix of values between 0 and 1. Each column of the matrix represents the weights/coefficients that will be applied to the basis functions determined by the knots and degree. Each column of theta represents a separate spline curve. |

A ggplot object that contains a plot of the spline curves. The number of spline curves in the plot will equal the number of columns in the matrix (or it will equal 1 if theta is a vector).