TABLE OF CONTENTS
curveUpdate/updatecurvex [ Functions ]
NAME
updatecurvex --- change observations of a curve
FUNCTION
Change the set of "x" values of a curve, that is, the set of points at which the curve is evaluated. This is called by mh.frail, when the frailties are updated. This function should be called if curve$x[i] was changed.
SYNOPSIS
2087 updatecurvex <- function(curve, i)
INPUTS
curve an RCurve structure i the index that was updated
OUTPUTS
curve the input curve, with the basis evaluated at x[i]
SOURCE
2090 { 2091 if(curve$name != "frailty") stop("Only frailty bases can be updated") 2092 if(curve$hasspline){ 2093 knots <- curve$spline.knots; ord <- curve$spline.ord; x <- curve$x[i] 2094 # recompute the basis at x[i] 2095 curve$spline.basis[i, ] <- mysplineDesign(knots, x, ord) / curve$spline.basisint 2096 # evaluate the spline component 2097 curve <- evalspline(curve, i) 2098 } 2099 # evaluate the parametric component 2100 curve <- evalparametric(curve, i) 2101 return(curve) 2102 }