Calculates the variance matrix of the random effects for a natural cubic smoothing spline. It is the tri-diagonal matrix \(\bold{G}_s\) given by Verbyla et al., (1999) multiplied by the variance component for the random spline effects.
mat.ncssvar(sigma2s = 1, knot.points, print = FALSE)A matrix containing the variances and covariances of the 
       random spline effects.
A numeric giving the value of the variance component
           for the random spline effects. The smoothing parameter is then the inverse 
           of the ratio of this component to the residual variance.
A numeric giving the values of the knots point 
           used in fitting the spline. These must be orderd in increasing order.
A logical indicating whether to print the matrix.
Chris Brien
Verbyla, A. P., Cullis, B. R., Kenward, M. G., and Welham, S. J. (1999). The analysis of designed experiments and longitudinal data by using smoothing splines (with discussion). Journal of the Royal Statistical Society, Series C (Applied Statistics), 48, 269-311.
Zncsspline.
Gs <- mat.ncssvar(knot.points = 1:10)
Run the code above in your browser using DataLab