approx.Z: Interpolating in Smoothing Spline Z-Matrix Columns
Description
Interpolates the Z-matrix for LME smoothing spline fits from one set of time
covariate values to another using linear interpolation of each column of the
Z-matrix, regarded as a function of time.
Usage
approx.Z(Z, oldtimes, newtimes)
Value
A matrix with the same number of columns as Z and rows
corresponding to newtimes, containing the interpolated Z-matrix values.
This can be used with smspline for fitting LME splines with
random effects at different time points or as part of the newdata
argument in predict.lme for predictions at new points.
Arguments
Z
Z-matrix with rows corresponding to the sorted unique values of the
time covariate (e.g., from smspline or smspline.v).
oldtimes
Numeric vector of original (sorted) time covariate values
corresponding to the rows of Z.
newtimes
Numeric vector of new time covariate values to interpolate to.