mat.ncssvar: Calculates the variance matrix of the random effects for a...

View source: R/mat.functions.r

mat.ncssvarR Documentation

Calculates the variance matrix of the random effects for a natural cubic smoothing spline

Description

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.

Usage

mat.ncssvar(sigma2s = 1, knot.points, print = FALSE)

Arguments

sigma2s

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.

knot.points

A numeric giving the values of the knots point used in fitting the spline. These must be orderd in increasing order.

print

A logical indicating whether to print the matrix.

Value

A matrix containing the variances and covariances of the random spline effects.

Author(s)

Chris Brien

References

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.

See Also

Zncsspline.

Examples

Gs <- mat.ncssvar(knot.points = 1:10)

dae documentation built on June 22, 2024, 9:07 a.m.